diff options
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 97da977c2a23..3c1c8c14e929 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -357,13 +357,13 @@ static void vlan_sync_address(struct net_device *dev, | |||
357 | * the new address */ | 357 | * the new address */ |
358 | if (compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) && | 358 | if (compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) && |
359 | !compare_ether_addr(vlandev->dev_addr, dev->dev_addr)) | 359 | !compare_ether_addr(vlandev->dev_addr, dev->dev_addr)) |
360 | dev_unicast_delete(dev, vlandev->dev_addr); | 360 | dev_uc_del(dev, vlandev->dev_addr); |
361 | 361 | ||
362 | /* vlan address was equal to the old address and is different from | 362 | /* vlan address was equal to the old address and is different from |
363 | * the new address */ | 363 | * the new address */ |
364 | if (!compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) && | 364 | if (!compare_ether_addr(vlandev->dev_addr, vlan->real_dev_addr) && |
365 | compare_ether_addr(vlandev->dev_addr, dev->dev_addr)) | 365 | compare_ether_addr(vlandev->dev_addr, dev->dev_addr)) |
366 | dev_unicast_add(dev, vlandev->dev_addr); | 366 | dev_uc_add(dev, vlandev->dev_addr); |
367 | 367 | ||
368 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); | 368 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); |
369 | } | 369 | } |
@@ -533,6 +533,10 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
533 | } | 533 | } |
534 | unregister_netdevice_many(&list); | 534 | unregister_netdevice_many(&list); |
535 | break; | 535 | break; |
536 | |||
537 | case NETDEV_PRE_TYPE_CHANGE: | ||
538 | /* Forbid underlaying device to change its type. */ | ||
539 | return NOTIFY_BAD; | ||
536 | } | 540 | } |
537 | 541 | ||
538 | out: | 542 | out: |