On 6/27/18 7:27 PM, Roopa Prabhu wrote: > From: Roopa Prabhu <ro...@cumulusnetworks.com> > > After commit f9d4b0c1e969 ("fib_rules: move common handling of newrule > delrule msgs into fib_nl2rule"), rule_find is strict about checking > for an existing rule. rule_find must check against all > user given attributes, else it may match against a subset > of attributes and return an existing rule. > > In the below case, without support for protocol match, rule_find > will match only against 'table main' and return an existing rule. > > $ip -4 rule add table main protocol boot > RTNETLINK answers: File exists > > This patch adds protocol support to rule_find, forcing it to > check protocol match if given by the user. > > Fixes: f9d4b0c1e969 ("fib_rules: move common handling of newrule delrule msgs > into fib_nl2rule") > Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> > ---
Reviewed-by: David Ahern <dsah...@gmail.com>