ipv4: FIB Local/MAIN table collapse
[deliverable/linux.git] / net / core / fib_rules.c
index 44706e81b2e03df3e9d39c1cd76879a4ede48d1e..b55677fed1c851fc628b3b70076d221022b93806 100644 (file)
@@ -492,6 +492,12 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh)
                        goto errout;
                }
 
+               if (ops->delete) {
+                       err = ops->delete(rule);
+                       if (err)
+                               goto errout;
+               }
+
                list_del_rcu(&rule->list);
 
                if (rule->action == FR_ACT_GOTO) {
@@ -517,8 +523,6 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh)
 
                notify_rule_change(RTM_DELRULE, rule, ops, nlh,
                                   NETLINK_CB(skb).portid);
-               if (ops->delete)
-                       ops->delete(rule);
                fib_rule_put(rule);
                flush_route_cache(ops);
                rules_ops_put(ops);
This page took 0.023472 seconds and 5 git commands to generate.