NM connection is abnormal due to ip addr flush
Add an IP address to the NIC interface. After the NM is restarted, run the ip addr flush command to delete the NIC IP address. The NM retains the IP address in connection eth1 after the IP address is deleted from the NIC interface.
The NM retains the IP address in connection eth1 after the IP address is deleted from the NIC interface.
NetworkManager version:1.40.0
Procedure:
Try the following steps twice:
[root@localhost ~]# ip addr add 192.168.1.20/24 dev eth1
[root@localhost ~]# systemctl restart NetworkManager
[root@localhost ~]# ip addr flush eth1
[root@localhost ~]# nmcli connection s eth1 |grep method
Expected result:
For connection eth1, ipv4.method is disabled, and ipv4.addresses is --.
Actual results:
When the same procedure is performed for the second time, the ipv4.method and ipv4.addresses attributes of connection eth1 are incorrectly displayed.