From 3a25b3bfc7bbfe93c66e2cdac98ea1868f0bbed7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 3 Jul 2020 12:43:34 +0200 Subject: [PATCH] bond: log only skipped bond options if they are set in the profile --- src/devices/nm-device-bond.c | 14 +++++++++----- 1 file 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