Skip to content

Commit

Permalink
vlan: Propagate NETDEV_NOTIFY_PEERS notifier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Apr 18, 2011
1 parent f47b946 commit 9960647
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9960647

Please sign in to comment.