diff options
author | Thomas Haller <thaller@redhat.com> | 2020-07-03 12:43:34 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-07-10 16:45:37 +0200 |
commit | 3a25b3bfc7bbfe93c66e2cdac98ea1868f0bbed7 (patch) | |
tree | 73a63e3bad452b641f51984cb781dc7466fee3fa | |
parent | 4aa46328ca89ae59fdca43d8031e9344c72897c9 (diff) | |
download | NetworkManager-3a25b3bfc7bbfe93c66e2cdac98ea1868f0bbed7.tar.gz |
bond: log only skipped bond options if they are set in the profile
-rw-r--r-- | src/devices/nm-device-bond.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c index 836ebfa031..2fedc753f3 100644 --- a/src/devices/nm-device-bond.c +++ b/src/devices/nm-device-bond.c @@ -248,13 +248,17 @@ set_bond_attr_or_default (NMDevice *device, const char *opt) { NMDeviceBond *self = NM_DEVICE_BOND (device); - const char *value = nm_setting_bond_get_option_or_default (s_bond, opt); + const char *value; - if (value) { - _set_bond_attr (device, opt, value); - } else { - _LOGD (LOGD_BOND, "bond option %s rejected due to incompatibility", opt); + value = nm_setting_bond_get_option_or_default (s_bond, opt); + if (!value) { + if ( _LOGT_ENABLED (LOGD_BOND) + && nm_setting_bond_get_option_by_name (s_bond, opt)) + _LOGT (LOGD_BOND, "bond option '%s' not set as it conflicts with other options", opt); + return; } + + _set_bond_attr (device, opt, value); } static gboolean |