PD#SWPL-9771
Problem:
The fib_rules change was incorrect and will be reverted upstream soon.
Solution:
Drop it now so that devices start working again.
Revert "fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied"
Revert "fib_rules: fix error in backport of
e9919a24d302 ("fib_rules: return 0...")"
This reverts commit
d5c71a7c533e88a9fcc74fe1b5c25743868fa300.
This reverts commit
1fff19a925e524556e85efcd728efad5274ce5b6
Verify:
locally
Change-Id: Iff9425390eb9a1cf2ae5d4ec4db6504c9d77de1d
Signed-off-by: jie.yuan <jie.yuan@amlogic.com>
rule->uid_range = fib_kuid_range_unset;
}
- if (rule_exists(ops, frh, tb, rule)) {
- err = 0;
- if (nlh->nlmsg_flags & NLM_F_EXCL)
- err = -EEXIST;
+ if ((nlh->nlmsg_flags & NLM_F_EXCL) &&
+ rule_exists(ops, frh, tb, rule)) {
+ err = -EEXIST;
goto errout_free;
}