]> git.baikalelectronics.ru Git - kernel.git/commit
[VLAN]: Fix MAC address handling
authorPatrick McHardy <kaber@trash.net>
Thu, 12 Jul 2007 02:45:24 +0000 (19:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jul 2007 02:45:24 +0000 (19:45 -0700)
commit03712a8f2541d5a8acd05918386716e4074410eb
tree3189e5568583a794aff9d014898ff9a74b79d7cc
parent775e4f246dbd30403bbdc4576dd8ec1b8da2a53f
[VLAN]: Fix MAC address handling

The VLAN MAC address handling is broken in multiple ways. When the address
differs when setting it, the real device is put in promiscous mode twice,
but never taken out again. Additionally it doesn't resync when the real
device's address is changed and needlessly puts it in promiscous mode when
the vlan device is still down.

Fix by moving address handling to vlan_dev_open/vlan_dev_stop and properly
deal with address changes in the device notifier. Also switch to
dev_unicast_add (which needs the exact same handling).

Since the set_mac_address handler is identical to the generic ethernet one
with these changes, kill it and use ether_setup().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h
net/8021q/vlan.c
net/8021q/vlan.h
net/8021q/vlan_dev.c