libnm: allow setting "primary" option with modes "tlb" and "alb"

(cherry picked from commit cb3a73af92)
This commit is contained in:
Thomas Haller 2020-09-09 12:34:47 +02:00
parent 97f7d4f64f
commit 2d4e604007
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -835,7 +835,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
}
primary = _bond_get_option (self, NM_SETTING_BOND_OPTION_PRIMARY);
if (bond_mode == NM_BOND_MODE_ACTIVEBACKUP) {
if (NM_IN_SET (bond_mode, NM_BOND_MODE_ACTIVEBACKUP,
NM_BOND_MODE_TLB,
NM_BOND_MODE_ALB)) {
GError *tmp_error = NULL;
if (primary && !nm_utils_ifname_valid_kernel (primary, &tmp_error)) {