diff options
author | Thomas Haller <thaller@redhat.com> | 2022-09-06 10:25:34 +0200 |
---|---|---|
committer | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2022-09-13 10:30:58 +0200 |
commit | 6d95c406dbe3b92676cb0aeb5b98e755c7cfc06a (patch) | |
tree | e2aa3e9610f36cdac9ff76808856b85b779c8772 /src/libnm-platform | |
parent | 89cbe126c4d41f945269d57d6bb5da7c9137bbe8 (diff) | |
download | NetworkManager-6d95c406dbe3b92676cb0aeb5b98e755c7cfc06a.tar.gz |
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.
Diffstat (limited to 'src/libnm-platform')
-rw-r--r-- | src/libnm-platform/nm-linux-platform.c | 5 |
1 files changed, 1 insertions, 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; |