From 8a6c4fca3df71a047b8e784412a715164df7dc2a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 23 Oct 2017 17:36:20 +0200 Subject: [PATCH] platform: log result also for EEXIST in sysctl_set() --- src/platform/nm-linux-platform.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index cc8be1ad7a..79a0eb0b6e 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -3026,11 +3026,13 @@ sysctl_set (NMPlatform *platform, const char *pathid, int dirfd, const char *pat break; } } - if (nwrote == -1 && errsv != EEXIST) { + if (nwrote == -1) { NMLogLevel level = LOGL_ERR; - if ( errsv == EINVAL - && nm_utils_sysctl_ip_conf_is_path (AF_INET6, path, NULL, "mtu")) { + if (errsv == EEXIST) { + level = LOGL_DEBUG; + } else if ( errsv == EINVAL + && nm_utils_sysctl_ip_conf_is_path (AF_INET6, path, NULL, "mtu")) { /* setting the MTU can fail under regular conditions. Suppress * logging a warning. */ level = LOGL_DEBUG;