Bug 2228889

Summary: NetworkManager Enabled IPv6 On Loopback Interface
Product: Red Hat Enterprise Linux 9 Reporter: Manoj <manoj.patel>
Component: NetworkManagerAssignee: NetworkManager Development Team <nm-team>
Status: CLOSED MIGRATED QA Contact: Vladimir Benes <vbenes>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.2CC: bgalvani, desktop-qa-list, lrintel, manoj.patel, rkhan, sfaye, sukulkar, till
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-17 13:17:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Network Manager Debug Logs none

Description Manoj 2023-08-03 14:10:00 UTC
Description of problem:

With NetworkManager version "NetworkManager-1.42.2-6.el9_2.x86_64" IPv6 is enabled on LoopBackup device even after /etc/sysctl.conf settings are configured to disable IPv6 on all devices. Same issue did not exist with earlier version of NetworkManager. 

After applying sysctl setting "sysctl -p" loopback IPv6 get disabled but after reboot its come back enabled.

I did not had similar issue with previous version of NetworkManager with RedHat 9. 

# disable ipv6
net.ipv6.conf.all.disable_ipv6 =  1
net.ipv6.conf.default.disable_ipv6 = 1

Version-Release number of selected component (if applicable):

NetworkManager-1.42.2-6.el9_2.x86_64

How reproducible:


Steps to Reproduce:
1. Update /etc/sysctl.conf to disable all interfaces IPv6.

# disable ipv6
net.ipv6.conf.all.disable_ipv6 =  1
net.ipv6.conf.default.disable_ipv6 = 1

2. sysctl -p
3. reboot

Ipv6 is enabled again by NetworkManager even /etc/sysctl.conf settings are configured to disable on all Devices. 

Actual results:

IPv6 is enabled on lo device with newer NetworkManager version. 

Expected results:

Disable IPv6 on lo device.

Additional info:

Comment 1 Manoj 2023-08-03 14:15:34 UTC
xxxxxx@rhellab01:~ $ ifconfig -a
ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet x.x.x.x  netmask 255.255.255.255  broadcast 0.0.0.0
        ether 00:50:56:90:1a:72  txqueuelen 1000  (Ethernet)
        RX packets 726  bytes 1017192 (993.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 560  bytes 305022 (297.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2  bytes 140 (140.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 140 (140.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

xxxx@rhellab01:~ $ cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

# disable ipv6
net.ipv6.conf.all.disable_ipv6 =  1
net.ipv6.conf.default.disable_ipv6 = 1


xxxxxx@rhellab01:~ $ rpm -qa | grep NetworkManager
NetworkManager-libnm-1.42.2-6.el9_2.x86_64
NetworkManager-1.42.2-6.el9_2.x86_64
NetworkManager-tui-1.42.2-6.el9_2.x86_64
NetworkManager-team-1.42.2-6.el9_2.x86_64

Comment 2 sfaye 2023-08-07 08:39:07 UTC
Hi Manoj, 

Thanks for reporting this. How often are you able to reproduce? Could you please share what you were aiming to achieve when you encountered the bug? This will give us a clearer picture of the context in which the bug occurred.

Also, could you please provide level=TRACE logs when reproducing please? See https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/contrib/fedora/rpm/NetworkManager.conf#L27 for hints about logging.

Thanks

Comment 3 Manoj 2023-08-07 12:55:05 UTC
Hello,

The goal is to disable IPv6 on "lo" loopback interface. 

This is getting enabled by NetworkManager service even "sysctl.conf" settings are configured to disabled IPv6 on all interfaces on the system.

# disable ipv6
net.ipv6.conf.all.disable_ipv6 =  1
net.ipv6.conf.default.disable_ipv6 = 1

Comment 4 Manoj 2023-08-07 13:09:51 UTC
Created attachment 1982133 [details]
Network Manager Debug Logs