Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c991255 authored by Vlad Yasevich's avatar Vlad Yasevich Committed by David S. Miller
Browse files

macvlan: Support bonding events



Bonding and team drivers generate specific events during failover
that trigger switch updates.  When a macvlan device is configured
on top of bonding, we want switches to learn about the macvlan
devices as well.   This patch adds a handler to macvlan driver to
propagate these events to all macvlan devices.  We let the generic
inetdev event handler do the work.

This allows macvlan to operated correctly over active-backup
mode bond.

Signed-off-by: default avatarVlad Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c565b488
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1209,6 +1209,13 @@ static int macvlan_device_event(struct notifier_block *unused,
	case NETDEV_PRE_TYPE_CHANGE:
		/* Forbid underlaying device to change its type. */
		return NOTIFY_BAD;

	case NETDEV_NOTIFY_PEERS:
	case NETDEV_BONDING_FAILOVER:
	case NETDEV_RESEND_IGMP:
		/* Propagate to all vlans */
		list_for_each_entry(vlan, &port->vlans, list)
			call_netdevice_notifiers(event, vlan->dev);
	}
	return NOTIFY_DONE;
}