diff options
-rw-r--r-- | net/ipv6/ip6mr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index cfac26d674ed..2dd832592a31 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -595,6 +595,7 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock) | |||
595 | int vifi = vifc->mif6c_mifi; | 595 | int vifi = vifc->mif6c_mifi; |
596 | struct mif_device *v = &vif6_table[vifi]; | 596 | struct mif_device *v = &vif6_table[vifi]; |
597 | struct net_device *dev; | 597 | struct net_device *dev; |
598 | int err; | ||
598 | 599 | ||
599 | /* Is vif busy ? */ | 600 | /* Is vif busy ? */ |
600 | if (MIF_EXISTS(vifi)) | 601 | if (MIF_EXISTS(vifi)) |
@@ -612,6 +613,11 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock) | |||
612 | dev = ip6mr_reg_vif(); | 613 | dev = ip6mr_reg_vif(); |
613 | if (!dev) | 614 | if (!dev) |
614 | return -ENOBUFS; | 615 | return -ENOBUFS; |
616 | err = dev_set_allmulti(dev, 1); | ||
617 | if (err) { | ||
618 | unregister_netdevice(dev); | ||
619 | return err; | ||
620 | } | ||
615 | break; | 621 | break; |
616 | #endif | 622 | #endif |
617 | case 0: | 623 | case 0: |
@@ -619,13 +625,14 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock) | |||
619 | if (!dev) | 625 | if (!dev) |
620 | return -EADDRNOTAVAIL; | 626 | return -EADDRNOTAVAIL; |
621 | dev_put(dev); | 627 | dev_put(dev); |
628 | err = dev_set_allmulti(dev, 1); | ||
629 | if (err) | ||
630 | return err; | ||
622 | break; | 631 | break; |
623 | default: | 632 | default: |
624 | return -EINVAL; | 633 | return -EINVAL; |
625 | } | 634 | } |
626 | 635 | ||
627 | dev_set_allmulti(dev, 1); | ||
628 | |||
629 | /* | 636 | /* |
630 | * Fill in the VIF structures | 637 | * Fill in the VIF structures |
631 | */ | 638 | */ |