aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vrf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vrf.c')
-rw-r--r--drivers/net/vrf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index fea687f35b5a..7d909c8183e9 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -462,8 +462,10 @@ static void vrf_rt6_release(struct net_device *dev, struct net_vrf *vrf)
462 } 462 }
463 463
464 if (rt6_local) { 464 if (rt6_local) {
465 if (rt6_local->rt6i_idev) 465 if (rt6_local->rt6i_idev) {
466 in6_dev_put(rt6_local->rt6i_idev); 466 in6_dev_put(rt6_local->rt6i_idev);
467 rt6_local->rt6i_idev = NULL;
468 }
467 469
468 dst = &rt6_local->dst; 470 dst = &rt6_local->dst;
469 dev_put(dst->dev); 471 dev_put(dst->dev);
@@ -1126,7 +1128,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it)
1126 goto nla_put_failure; 1128 goto nla_put_failure;
1127 1129
1128 /* rule only needs to appear once */ 1130 /* rule only needs to appear once */
1129 nlh->nlmsg_flags &= NLM_F_EXCL; 1131 nlh->nlmsg_flags |= NLM_F_EXCL;
1130 1132
1131 frh = nlmsg_data(nlh); 1133 frh = nlmsg_data(nlh);
1132 memset(frh, 0, sizeof(*frh)); 1134 memset(frh, 0, sizeof(*frh));