diff options
-rw-r--r-- | drivers/net/macvlan.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index c02ceaa4a216..980001c2cf96 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -189,12 +189,20 @@ static int macvlan_open(struct net_device *dev) | |||
189 | 189 | ||
190 | err = dev_unicast_add(lowerdev, dev->dev_addr, ETH_ALEN); | 190 | err = dev_unicast_add(lowerdev, dev->dev_addr, ETH_ALEN); |
191 | if (err < 0) | 191 | if (err < 0) |
192 | return err; | 192 | goto out; |
193 | if (dev->flags & IFF_ALLMULTI) | 193 | if (dev->flags & IFF_ALLMULTI) { |
194 | dev_set_allmulti(lowerdev, 1); | 194 | err = dev_set_allmulti(lowerdev, 1); |
195 | if (err < 0) | ||
196 | goto del_unicast; | ||
197 | } | ||
195 | 198 | ||
196 | hlist_add_head_rcu(&vlan->hlist, &port->vlan_hash[dev->dev_addr[5]]); | 199 | hlist_add_head_rcu(&vlan->hlist, &port->vlan_hash[dev->dev_addr[5]]); |
197 | return 0; | 200 | return 0; |
201 | |||
202 | del_unicast: | ||
203 | dev_unicast_delete(lowerdev, dev->dev_addr, ETH_ALEN); | ||
204 | out: | ||
205 | return err; | ||
198 | } | 206 | } |
199 | 207 | ||
200 | static int macvlan_stop(struct net_device *dev) | 208 | static int macvlan_stop(struct net_device *dev) |