[ovs-dev] [PATCH] netdev-linux: do not touch LAG slaves if master is not attached to ovs.

Tao Liu thomas.liu at ucloud.cn
Fri Mar 19 09:57:24 UTC 2021


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 slaves shoud not be updated.

Fixes: d22f8927c3c9 ("netdev-linux: monitor and offload LAG slaves to TC")
CC: John Hurley <john.hurley at netronome.com>
Signed-off-by: Tao Liu <thomas.liu at ucloud.cn>
---
 lib/netdev-linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 15b25084b..b3fcee403 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -680,7 +680,7 @@ netdev_linux_update_lag(struct rtnetlink_change *change)
 
             if (is_netdev_linux_class(master_netdev->netdev_class)) {
                 block_id = netdev_get_block_id(master_netdev);
-                if (!block_id) {
+                if (!block_id || master_netdev->auto_classified) {
                     netdev_close(master_netdev);
                     return;
                 }
-- 
2.23.0



More information about the dev mailing list