-
Bug
-
Resolution: Done-Errata
-
Major
-
CentOS Stream 9
-
NetworkManager-1.46.0-1.el9
-
Yes
-
None
-
1
-
rhel-net-mgmt
-
ssg_networking
-
26
-
3
-
False
-
False
-
-
No
-
NMT - Last NMT changes
-
-
Pass
-
Automated
-
None
What were you trying to do that didn't work?
Every time I suspend my laptop and resume it the next day, my Fedora VM loses the DHCPv4 address and is not able to renew it. After we enabled IPv4 DAD by default, NM tries to get a new lease and then sends a DHCP DECLINE because it thinks the address is duplicate.
Please provide the package NVR for which bug is seen:
1.46-rc1
How reproducible:
Always
Steps to reproduce
Suspend the machine; any VM using NM 1.46-rc1 will lose the address if the suspend time is greater than the lease time. Or use the following script:
#!/bin/sh set -e cleanup() { ( ip netns del ns1 ip link delete veth0 ip link delete veth1 nmcli connection delete veth0+ killall dnsmasq ) 2>/dev/null || true } check_address() { if [ $(ip -j addr show veth0 | jq -r .[0].addr_info[0].local | wc -l) != 1 ]; then echo "Error: address not configured" ip addr show veth0 exit 1 fi } cleanup echo "* setup..." ip netns add ns1 ip link add veth0 type veth peer netns ns1 name veth1 ip link set veth0 up ip -n ns1 link set veth1 up ip -n ns1 addr add dev veth1 172.25.10.1/24 ip netns exec ns1 dnsmasq --bind-interfaces --interface veth1 -d --dhcp-range=172.25.10.100,172.25.10.200,60 & echo "* activate connection..." nmcli connection add type ethernet ifname veth0 con-name veth0+ ipv6.method disabled connection.autoconnect no nmcli connection up veth0+ check_address echo "* wait expiry..." killall dnsmasq for i in $(seq 1 122); do sleep 1 echo " - after $i seconds: $(ip -j addr show veth0 | jq -r '.[0].addr_info[0].local,.[0].addr_info[0].valid_life_time' | tr '\n' ' ')" done echo "* restart DHCP server..." ip netns exec ns1 dnsmasq --bind-interfaces --interface veth1 -d --dhcp-range=172.25.10.100,172.25.10.200,60 & for i in $(seq 1 20); do sleep 1 echo " - after $i seconds: $(ip -j addr show veth0 | jq -r '.[0].addr_info[0].local,.[0].addr_info[0].valid_life_time' | tr '\n' ' ')" done
Expected results
The lease is renewed immediately.
Actual results
NM sends a DHCP DECLINE.
- links to
-
RHBA-2023:120156 NetworkManager bug fix and enhancement update