From 47b66e0dcd156fa47958e38aa90fed88458f4e2f Mon Sep 17 00:00:00 2001 From: Wang Chen Date: Mon, 14 Jul 2008 20:54:23 -0700 Subject: [PATCH] --- yaml --- r: 103451 b: refs/heads/master c: 5ae7b444137143a4e067b80354171ab128eb1b2b h: refs/heads/master i: 103449: 7a733accba1f3b6466bbdbd9efe489d9e1acbdb5 103447: 8fb7cc2f9ec88f34716cbd18b7d7d2e92b5d4e77 v: v3 --- [refs] | 2 +- trunk/net/ipv6/ip6mr.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 66af3b060136..a2c8ea9af92e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bc3f9076f671f128c82022428992c30be57f22d5 +refs/heads/master: 5ae7b444137143a4e067b80354171ab128eb1b2b diff --git a/trunk/net/ipv6/ip6mr.c b/trunk/net/ipv6/ip6mr.c index cfac26d674ed..2dd832592a31 100644 --- a/trunk/net/ipv6/ip6mr.c +++ b/trunk/net/ipv6/ip6mr.c @@ -595,6 +595,7 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock) int vifi = vifc->mif6c_mifi; struct mif_device *v = &vif6_table[vifi]; struct net_device *dev; + int err; /* Is vif busy ? */ if (MIF_EXISTS(vifi)) @@ -612,6 +613,11 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock) dev = ip6mr_reg_vif(); if (!dev) return -ENOBUFS; + err = dev_set_allmulti(dev, 1); + if (err) { + unregister_netdevice(dev); + return err; + } break; #endif case 0: @@ -619,13 +625,14 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock) if (!dev) return -EADDRNOTAVAIL; dev_put(dev); + err = dev_set_allmulti(dev, 1); + if (err) + return err; break; default: return -EINVAL; } - dev_set_allmulti(dev, 1); - /* * Fill in the VIF structures */