From 20d905e59050abb8dfe69861bd1a8803ba8ea6d7 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 15 Aug 2018 18:27:06 +0200 Subject: [PATCH] platform: if AF_INET6 is not available, don't warn These should be logged on DEBUG level: platform-linux: do-change-link[2]: failure changing link: failure 97 (Address family not supported by protocol) device (wlo1): failed to enable userspace IPv6LL address handling (unspecified) https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/10 --- src/devices/nm-device.c | 3 ++- src/platform/nm-linux-platform.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 0427039b8b..81cd57bd2e 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -9345,7 +9345,8 @@ set_nm_ipv6ll (NMDevice *self, gboolean enable) _LOGD (LOGD_IP6, "will %s userland IPv6LL", detail); plerr = nm_platform_link_set_user_ipv6ll_enabled (nm_device_get_platform (self), ifindex, enable); if (plerr != NM_PLATFORM_ERROR_SUCCESS) { - _NMLOG (plerr == NM_PLATFORM_ERROR_NOT_FOUND ? LOGL_DEBUG : LOGL_WARN, + _NMLOG (( plerr == NM_PLATFORM_ERROR_NOT_FOUND + || plerr == NM_PLATFORM_ERROR_OPNOTSUPP) ? LOGL_DEBUG : LOGL_WARN, LOGD_IP6, "failed to %s userspace IPv6LL address handling (%s)", detail, diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index fd0210bb0d..a960f41ef1 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -5195,6 +5195,9 @@ retry: } else if (NM_IN_SET (-((int) seq_result), ENODEV)) { log_level = LOGL_DEBUG; result = NM_PLATFORM_ERROR_NOT_FOUND; + } else if (-((int) seq_result) == EAFNOSUPPORT) { + log_level = LOGL_DEBUG; + result = NM_PLATFORM_ERROR_OPNOTSUPP; } else { log_level = LOGL_WARN; result = NM_PLATFORM_ERROR_UNSPECIFIED;