Thread (4 messages) flat view 4 messages, 2 authors, 2018-06-29

Re: [PATCH net] net: fib_rules: add protocol check in rule_find

From: David Ahern <hidden>
Date: 2018-06-28 15:26:43

On 6/27/18 7:27 PM, Roopa Prabhu wrote:
From: Roopa Prabhu <redacted>

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 <redacted>
---
Reviewed-by: David Ahern <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help