diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2011-04-15 17:46:49 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-18 10:35:16 +0400 |
commit | 99606477a5888b0ead0284fecb13417b1da8e3af (patch) | |
tree | 7d5084ad6849034fd7676032d2f6868c7a6b48d1 /net | |
parent | f47b94646f30529624c82ab0f9cd5bd3f25ef9d2 (diff) | |
download | linux-99606477a5888b0ead0284fecb13417b1da8e3af.tar.xz |
vlan: Propagate NETDEV_NOTIFY_PEERS notifier
The NETDEV_NOTIFY_PEERS notifier indicates that a device moved to a
different physical link; this also applies to any VLAN devices on top
of it.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/8021q/vlan.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 14ef5efbc653..b2ff70fcf8ea 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -499,6 +499,17 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, case NETDEV_PRE_TYPE_CHANGE: /* Forbid underlaying device to change its type. */ return NOTIFY_BAD; + + case NETDEV_NOTIFY_PEERS: + /* Propagate to vlan devices */ + for (i = 0; i < VLAN_N_VID; i++) { + vlandev = vlan_group_get_device(grp, i); + if (!vlandev) + continue; + + call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, vlandev); + } + break; } out: |