From 6d95c406dbe3b92676cb0aeb5b98e755c7cfc06a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 6 Sep 2022 10:25:34 +0200 Subject: platform: don't fallback to IFLA_BOND_ACTIVE_SLAVE for the primary The IFLA_BOND_ACTIVE_SLAVE and IFLA_BOND_PRIMARY are not the same. If the primary is not set, then that's it. Don't fallback. Only NetworkManager API deprecated "active-slave" and uses it as alias for "primary". That does not mean, kernel/netlink does that. --- src/libnm-platform/nm-linux-platform.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index 472884d3d5..954b8a61e6 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -1589,11 +1589,8 @@ _parse_lnk_bond(const char *kind, struct nlattr *info_data) if (tb[IFLA_BOND_MODE]) props->mode = nla_get_u8(tb[IFLA_BOND_MODE]); - if (tb[IFLA_BOND_PRIMARY]) { + if (tb[IFLA_BOND_PRIMARY]) props->primary = nla_get_u32(tb[IFLA_BOND_PRIMARY]); - } else if (tb[IFLA_BOND_ACTIVE_SLAVE]) { - props->primary = nla_get_u32(tb[IFLA_BOND_ACTIVE_SLAVE]); - } if (tb[IFLA_BOND_MIIMON]) { props->miimon = nla_get_u32(tb[IFLA_BOND_MIIMON]); props->miimon_has = TRUE; -- cgit v1.2.1