diff options
Diffstat (limited to 'net/ipv4/fib_rules.c')
-rw-r--r-- | net/ipv4/fib_rules.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index fd4a8cd4c06e..b837c33e0404 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c | |||
@@ -299,6 +299,13 @@ static u32 fib4_rule_default_pref(void) | |||
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | 301 | ||
302 | static size_t fib4_rule_nlmsg_payload(struct fib_rule *rule) | ||
303 | { | ||
304 | return nla_total_size(4) /* dst */ | ||
305 | + nla_total_size(4) /* src */ | ||
306 | + nla_total_size(4); /* flow */ | ||
307 | } | ||
308 | |||
302 | static struct fib_rules_ops fib4_rules_ops = { | 309 | static struct fib_rules_ops fib4_rules_ops = { |
303 | .family = AF_INET, | 310 | .family = AF_INET, |
304 | .rule_size = sizeof(struct fib4_rule), | 311 | .rule_size = sizeof(struct fib4_rule), |
@@ -308,6 +315,7 @@ static struct fib_rules_ops fib4_rules_ops = { | |||
308 | .compare = fib4_rule_compare, | 315 | .compare = fib4_rule_compare, |
309 | .fill = fib4_rule_fill, | 316 | .fill = fib4_rule_fill, |
310 | .default_pref = fib4_rule_default_pref, | 317 | .default_pref = fib4_rule_default_pref, |
318 | .nlmsg_payload = fib4_rule_nlmsg_payload, | ||
311 | .nlgroup = RTNLGRP_IPV4_RULE, | 319 | .nlgroup = RTNLGRP_IPV4_RULE, |
312 | .policy = fib4_rule_policy, | 320 | .policy = fib4_rule_policy, |
313 | .rules_list = &fib4_rules, | 321 | .rules_list = &fib4_rules, |