[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180624.112535.639108631501858541.davem@davemloft.net>
Date: Sun, 24 Jun 2018 11:25:35 +0900 (KST)
From: David Miller <davem@...emloft.net>
To: Jason@...c4.com
Cc: roopa@...ulusnetworks.com, netdev@...r.kernel.org
Subject: Re: [PATCH] fib_rules: match rules based on suppress_* properties
too
From: "Jason A. Donenfeld" <Jason@...c4.com>
Date: Sat, 23 Jun 2018 17:59:30 +0200
> Two rules with different values of suppress_prefix or suppress_ifgroup
> are not the same. This fixes an -EEXIST when running:
>
> $ ip -4 rule add table main suppress_prefixlength 0
>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> Fixes: f9d4b0c1e969 ("fib_rules: move common handling of newrule delrule msgs into fib_nl2rule")
But the old rule_find() code didn't check this key either, so I can't
see how the behavior in this area changed.
I think the behavior changed for a different reason.
The commit mentioned in your Fixes: tag changed newrule semantics
wrt. defaults or "any" values.
The original code matched on pure values of the keys, whereas the new
code only compares the keys when the new rule is not specifying an
"any" value.
- if (r->table != rule->table)
+ if (rule->table && r->table != rule->table)
continue;
And I think these changes are what makes your test case fail after the
commit. Some other key didn't match previous due to the handling of
"any" values.
Powered by blists - more mailing lists