Skip to content

Commit

Permalink
fib_rules: fix unresolved_rules counting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yan, Zheng authored and David S. Miller committed Oct 19, 2011
1 parent 1b23a3e commit afaef73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/core/fib_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit afaef73

Please sign in to comment.