]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ipvlan: Support bonding events
authorEtienne Champetier <champetier.etienne@gmail.com>
Thu, 9 Jan 2025 03:28:18 +0000 (22:28 -0500)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Jan 2025 02:10:24 +0000 (18:10 -0800)
This allows ipvlan to function properly on top of
bonds using active-backup mode.
This was implemented for macvlan in 2014 in commit
4c9912556867 ("macvlan: Support bonding events").

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
Link: https://patch.msgid.link/20250109032819.326528-2-champetier.etienne@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipvlan/ipvlan_main.c

index ee2c3cf4df365eb3d4e476d421a7ec42f30016d1..da3a97a655070ef918ef9b6c866df400d1736a25 100644 (file)
@@ -799,6 +799,12 @@ static int ipvlan_device_event(struct notifier_block *unused,
        case NETDEV_PRE_TYPE_CHANGE:
                /* Forbid underlying device to change its type. */
                return NOTIFY_BAD;
+
+       case NETDEV_NOTIFY_PEERS:
+       case NETDEV_BONDING_FAILOVER:
+       case NETDEV_RESEND_IGMP:
+               list_for_each_entry(ipvlan, &port->ipvlans, pnode)
+                       call_netdevice_notifiers(event, ipvlan->dev);
        }
        return NOTIFY_DONE;
 }