]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
vlan: Propagate NETDEV_NOTIFY_PEERS notifier
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 15 Apr 2011 13:46:49 +0000 (13:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Apr 2011 06:35:16 +0000 (23:35 -0700)
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>
net/8021q/vlan.c

index 14ef5efbc653675ca7b3c23161fbe39f689c669f..b2ff70fcf8eada20569f1cb8c93315a49f7c4051 100644 (file)
@@ -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: