fib_rules: fix unresolved_rules counting
Subsystems (3)
PATCH 1/1 fib_rules: fix unresolved_rules counting
we should decrease ops->unresolved_rules when deleting a unresolved rule.
Signed-off-by Zheng Yan <[email protected]>
---
net/core/fib_rules.c +4 -1
@@ -475,8 +475,11 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)list_del_rcu (&rule->list); -if (rule->action ==FR_ACT_GOTO ) +if (rule->action ==FR_ACT_GOTO ) { ops->nr_goto_rules--; +if (rtnl_dereference (rule->ctarget) ==NULL ) + ops->unresolved_rules--; + }/* * Check if this rule is a target to any of them. If so,
Quoted 11 lines · Zheng
we should decrease
ops->unresolved_ruleswhen deleting a unresolved rule.Signed-off-by Zheng Yan <[email protected]>---
net/core/fib_rules.c +0
-0@@ -475,8 +475,11 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)list_del_rcu (&rule->list);
net/core/fib_rules.c static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) · line 485
Quoted 10 lines
net/core/fib_rules.c +4
-1-if (rule->action ==FR_ACT_GOTO ) +if (rule->action ==FR_ACT_GOTO ) { ops->nr_goto_rules--; +if (rtnl_dereference (rule->ctarget) ==NULL ) + ops->unresolved_rules--; + }/* * Check if this rule is a target to any of them. If so,
Acked-by Eric Dumazet <[email protected]>
From: Eric Dumazet <[email protected]>
Date: Tue, 18 Oct 2011 05:47:31 +0200
Quoted 4 lines · Zheng
Quoted 3 lines
we should decrease
ops->unresolved_ruleswhen deleting a unresolved rule.Signed-off-by Zheng Yan <[email protected]>
...
Quoted 2 lines
Acked-by Eric Dumazet <[email protected]>
Applied, thanks.