diff options
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index ef4ee45b928..54596f73eff 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -494,8 +494,10 @@ static int vif_add(struct net *net, struct vifctl *vifc, int mrtsock) | |||
494 | return -EINVAL; | 494 | return -EINVAL; |
495 | } | 495 | } |
496 | 496 | ||
497 | if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) | 497 | if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) { |
498 | dev_put(dev); | ||
498 | return -EADDRNOTAVAIL; | 499 | return -EADDRNOTAVAIL; |
500 | } | ||
499 | IPV4_DEVCONF(in_dev->cnf, MC_FORWARDING)++; | 501 | IPV4_DEVCONF(in_dev->cnf, MC_FORWARDING)++; |
500 | ip_rt_multicast_event(in_dev); | 502 | ip_rt_multicast_event(in_dev); |
501 | 503 | ||