Skip to content

Commit afaef73

Browse files
Yan, Zhengdavem330
authored andcommitted
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>
1 parent 1b23a3e commit afaef73

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎net/core/fib_rules.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,11 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
475475

476476
list_del_rcu(&rule->list);
477477

478-
if (rule->action == FR_ACT_GOTO)
478+
if (rule->action == FR_ACT_GOTO) {
479479
ops->nr_goto_rules--;
480+
if (rtnl_dereference(rule->ctarget) == NULL)
481+
ops->unresolved_rules--;
482+
}
480483

481484
/*
482485
* Check if this rule is a target to any of them. If so,

0 commit comments

Comments
 (0)