From 8166c066a77c5e61e171a1a4d8eec6928b8b8109 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Thu, 30 Jun 2022 16:34:05 +0800 Subject: netdev-linux: Do not touch LAG members if master is not attached to OVS. Bond master netdev may be created without a classification type, due to routing or tunneling code. If bond master is not attached to ovs, the ingress block on LAG members should not be updated. Simple reproducer: tc q ls dev net3 ingress ip a add 10.1.1.1/30 dev bond0 ip l set net3 master bond0 tc q ls dev net3 ingress Fixes: d22f8927c3c9 ("netdev-linux: monitor and offload LAG slaves to TC") Signed-off-by: Tao Liu Acked-by: Roi Dayan Signed-off-by: Ilya Maximets --- lib/netdev-linux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/netdev-linux.c') diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 9e63b1242..5a62196b9 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -682,7 +682,10 @@ netdev_linux_update_lag(struct rtnetlink_change *change) return; } - if (is_netdev_linux_class(master_netdev->netdev_class)) { + /* If LAG master is not attached to ovs, ingress block on LAG + * members shoud not be updated. */ + if (!master_netdev->auto_classified && + is_netdev_linux_class(master_netdev->netdev_class)) { block_id = netdev_get_block_id(master_netdev); if (!block_id) { netdev_close(master_netdev); -- cgit v1.2.1