aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/fib_rules.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/fib_rules.c')
-rw-r--r--net/core/fib_rules.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 21735440c44a..2ef5040c99c8 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -226,6 +226,9 @@ jumped:
226 else 226 else
227 err = ops->action(rule, fl, flags, arg); 227 err = ops->action(rule, fl, flags, arg);
228 228
229 if (!err && ops->suppress && ops->suppress(rule, arg))
230 continue;
231
229 if (err != -EAGAIN) { 232 if (err != -EAGAIN) {
230 if ((arg->flags & FIB_LOOKUP_NOREF) || 233 if ((arg->flags & FIB_LOOKUP_NOREF) ||
231 likely(atomic_inc_not_zero(&rule->refcnt))) { 234 likely(atomic_inc_not_zero(&rule->refcnt))) {
@@ -337,6 +340,8 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh)
337 rule->action = frh->action; 340 rule->action = frh->action;
338 rule->flags = frh->flags; 341 rule->flags = frh->flags;
339 rule->table = frh_get_table(frh, tb); 342 rule->table = frh_get_table(frh, tb);
343 if (tb[FRA_TABLE_PREFIXLEN_MIN])
344 rule->table_prefixlen_min = nla_get_u8(tb[FRA_TABLE_PREFIXLEN_MIN]);
340 345
341 if (!tb[FRA_PRIORITY] && ops->default_pref) 346 if (!tb[FRA_PRIORITY] && ops->default_pref)
342 rule->pref = ops->default_pref(ops); 347 rule->pref = ops->default_pref(ops);
@@ -523,6 +528,7 @@ static inline size_t fib_rule_nlmsg_size(struct fib_rules_ops *ops,
523 + nla_total_size(IFNAMSIZ) /* FRA_OIFNAME */ 528 + nla_total_size(IFNAMSIZ) /* FRA_OIFNAME */
524 + nla_total_size(4) /* FRA_PRIORITY */ 529 + nla_total_size(4) /* FRA_PRIORITY */
525 + nla_total_size(4) /* FRA_TABLE */ 530 + nla_total_size(4) /* FRA_TABLE */
531 + nla_total_size(1) /* FRA_TABLE_PREFIXLEN_MIN */
526 + nla_total_size(4) /* FRA_FWMARK */ 532 + nla_total_size(4) /* FRA_FWMARK */
527 + nla_total_size(4); /* FRA_FWMASK */ 533 + nla_total_size(4); /* FRA_FWMASK */
528 534
@@ -548,6 +554,8 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,
548 frh->table = rule->table; 554 frh->table = rule->table;
549 if (nla_put_u32(skb, FRA_TABLE, rule->table)) 555 if (nla_put_u32(skb, FRA_TABLE, rule->table))
550 goto nla_put_failure; 556 goto nla_put_failure;
557 if (nla_put_u8(skb, FRA_TABLE_PREFIXLEN_MIN, rule->table_prefixlen_min))
558 goto nla_put_failure;
551 frh->res1 = 0; 559 frh->res1 = 0;
552 frh->res2 = 0; 560 frh->res2 = 0;
553 frh->action = rule->action; 561 frh->action = rule->action;