Log spam when ipv6 is disabled via sysctl
Summary
The issue is very similar to #1040 (closed) , however, in my case IPv6 is not disabled in the kernel, but disabled on a wifi device via sysctl:
/etc/sysctl.d/99-sysctl.conf: net.ipv6.conf.wlp0s20f3.disable_ipv6 = 1
All other interfaces have ipv6 enabled:
$ sysctl net.ipv6.conf.{all,default}.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
And the ipv6 is in auto
for the wifi connection:
$ nmcli -g ipv6.method connection show 'WiFi_1'
auto
Under these conditions I'm getting about 20 log messages per minute:
Dec 11 13:27:34 NetworkManager[1708]: <warn> [1702297654.7731] platform-linux: do-add-ip6-address[3: fe80::c3c5:e79a:bbf:27c5]: failure 13 (Permission denied)
Dec 11 13:27:36 NetworkManager[1708]: <warn> [1702297656.7747] platform-linux: do-add-ip6-address[3: fe80::499e:6969:af28:bfdf]: failure 13 (Permission denied)
Dec 11 13:27:38 NetworkManager[1708]: <warn> [1702297658.7759] platform-linux: do-add-ip6-address[3: fe80::550d:d17d:af6b:2f]: failure 13 (Permission denied)
Dec 11 13:27:40 NetworkManager[1708]: <warn> [1702297660.7771] platform-linux: do-add-ip6-address[3: fe80::64a8:ff93:c57e:2209]: failure 13 (Permission denied)
Dec 11 13:27:42 NetworkManager[1708]: <warn> [1702297662.7773] platform-linux: do-add-ip6-address[3: fe80::4e8e:3ec5:6f93:905]: failure 13 (Permission denied)
Dec 11 13:27:44 NetworkManager[1708]: <warn> [1702297664.7788] platform-linux: do-add-ip6-address[3: fe80::1660:580a:58ad:f93f]: failure 13 (Permission denied)
Dec 11 13:27:46 NetworkManager[1708]: <warn> [1702297666.7796] ipv6ll[039f44e7a50e205b,ifindex=3]: changed: no IPv6 link local address to retry after Duplicate Address Detection failures (back off)
Unlike the support disabled in the kernel, the error is EACCES, instead of ENOTSUPP, and the ipv6 is not disabled in the kernel entirely. And so, the fix for #1040 (closed) doesn't help here.
Interestingly, I have ipv6 disabled on this device for at least 3 years (there were multiple Fedora upgrades during that time), but I don't remember having this log spam. Though I can't pinpoint the exact moment it started, it might have been months ago.
Version affected
Experiencing the issue on version 1.42.8-1.fc38
, but it is likley to be present on main.
Steps to reproduce
Disable ipv6 via sysctl on the wifi device while keeping the connection method in auto
.
Having a tunnel interface might be relevant as I see failures to add a route for a tunnel via wifi device with IPv6 is disabled on nexthop device
as well.
Actual result
Log spam.
Expected result
One time logging or, at least, far less logging.
Relevant logs
These are the syscalls that repeatedly fail with EACCES:
1708 sendmsg(13, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=72, nlmsg_type=RTM_NEWADDR, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_REPLACE|NLM_F_CREATE, nlmsg_seq=7477808, nlmsg_pid=1708}, {ifa_family=AF_INET6, ifa_prefixlen=64, ifa_flags=0, ifa_scope=RT_SCOPE_UNIVERSE, ifa_index=if_nametoindex("wlp0s20f3")}, [[{nla_len=20, nla_type=IFA_LOCAL}, inet_pton(AF_INET6, "fe80::64a8:ff93:c57e:2209")], [{nla_len=20, nla_type=IFA_ADDRESS}, inet_pton(AF_INET6, "fe80::64a8:ff93:c57e:2209")], [{nla_len=8, nla_type=IFA_FLAGS}, IFA_F_NOPREFIXROUTE]]], iov_len=72}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 72
1708 recvmsg(13, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=92, nlmsg_type=NLMSG_ERROR, nlmsg_flags=0, nlmsg_seq=7477808, nlmsg_pid=1708}, {error=-EACCES, msg=[{nlmsg_len=72, nlmsg_type=RTM_NEWADDR, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_REPLACE|NLM_F_CREATE, nlmsg_seq=7477808, nlmsg_pid=1708}, {ifa_family=AF_INET6, ifa_prefixlen=64, ifa_flags=0, ifa_scope=RT_SCOPE_UNIVERSE, ifa_index=if_nametoindex("wlp0s20f3")}, [[{nla_len=20, nla_type=IFA_LOCAL}, inet_pton(AF_INET6, "fe80::64a8:ff93:c57e:2209")], [{nla_len=20, nla_type=IFA_ADDRESS}, inet_pton(AF_INET6, "fe80::64a8:ff93:c57e:2209")], [{nla_len=8, nla_type=IFA_FLAGS}, IFA_F_NOPREFIXROUTE]]]}], iov_len=32768}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=0, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, 0) = 92
1708 sendmsg(13, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=64, nlmsg_type=RTM_NEWROUTE, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_CREATE|NLM_F_APPEND, nlmsg_seq=7477810, nlmsg_pid=1708}, {rtm_family=AF_INET6, rtm_dst_len=64, rtm_src_len=0, rtm_tos=0, rtm_table=RT_TABLE_MAIN, rtm_protocol=RTPROT_KERNEL, rtm_scope=RT_SCOPE_NOWHERE, rtm_type=RTN_UNICAST, rtm_flags=0}, [[{nla_len=20, nla_type=RTA_DST}, inet_pton(AF_INET6, "fe80::")], [{nla_len=8, nla_type=RTA_PRIORITY}, 1024], [{nla_len=8, nla_type=RTA_OIF}, if_nametoindex("wlp0s20f3")]]], iov_len=64}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
1708 recvmsg(13, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base=[{nlmsg_len=124, nlmsg_type=NLMSG_ERROR, nlmsg_flags=NLM_F_ACK_TLVS, nlmsg_seq=7477810, nlmsg_pid=1708}, [{error=-EACCES, msg=[{nlmsg_len=64, nlmsg_type=RTM_NEWROUTE, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|NLM_F_CREATE|NLM_F_APPEND, nlmsg_seq=7477810, nlmsg_pid=1708}, {rtm_family=AF_INET6, rtm_dst_len=64, rtm_src_len=0, rtm_tos=0, rtm_table=RT_TABLE_MAIN, rtm_protocol=RTPROT_KERNEL, rtm_scope=RT_SCOPE_NOWHERE, rtm_type=RTN_UNICAST, rtm_flags=0}, [[{nla_len=20, nla_type=RTA_DST}, inet_pton(AF_INET6, "fe80::")], [{nla_len=8, nla_type=RTA_PRIORITY}, 1024], [{nla_len=8, nla_type=RTA_OIF}, if_nametoindex("wlp0s20f3")]]]}, [{nla_len=39, nla_type=NLMSGERR_ATTR_MSG}, "IPv6 is disabled on nexthop devi"...]]], iov_len=32768}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=0, uid=0, gid=0}}], msg_controllen=32, msg_flags=0}, 0) = 124