diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2011-10-17 17:20:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-20 01:17:41 +0200 |
commit | afaef734e5f0004916d07ecf7d86292cdd00d59b (patch) | |
tree | 9ea614b4a5d7457f56fe0b776aef70f3a137cd79 /net | |
parent | r8169: fix wrong eee setting for rlt8111evl (diff) | |
download | linux-afaef734e5f0004916d07ecf7d86292cdd00d59b.tar.xz linux-afaef734e5f0004916d07ecf7d86292cdd00d59b.zip |
fib_rules: fix unresolved_rules counting
we should decrease ops->unresolved_rules when deleting a unresolved rule.
Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/fib_rules.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 3231b468bb72..27071ee2a4e1 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -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, |