Date: Sat, 26 Mar 2022 08:34:17 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262821] dhclient keeps contradicting leases Message-ID: <bug-262821-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262821 Bug ID: 262821 Summary: dhclient keeps contradicting leases Product: Base System Version: 12.3-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: bsd@volki.at According to the dhclient(8) manpage, "Old leases are kept around in case t= he DHCP server is unavailable when dhclient is first invoked (generally during= the initial system boot process). In that event, old leases from the dhclient.leases.IFNAME file which have not yet expired are tested, and if t= hey are determined to be valid, they are used until either they expire or the D= HCP server becomes available." Now the problem is that even after the new lease becomes available and acti= ve, the old lease is still kept in /var/db/dhclient.leases.<interface>. This lo= oks like a bug: ~# killall dhclient ~# rm /var/db/dhclient.leases.em0=20 ~# dhclient em0 DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 5 DHCPOFFER from 100.64.0.1 DHCPREQUEST on em0 to 255.255.255.255 port 67 DHCPACK from 100.64.0.1 bound to 100.64.122.132 -- renewal in 43140 seconds. ~# killall dhclient ~# cat /var/db/dhclient.leases.em0=20 lease { interface "em0"; fixed-address 100.64.122.132; option subnet-mask 255.255.128.0; option routers 100.64.0.1; option domain-name-servers 213.143.111.122,8.8.8.8; option domain-name "ve1.innonet.at"; option dhcp-lease-time 86281; option dhcp-message-type 5; option dhcp-server-identifier 172.26.0.120; renew 6 2022/3/26 20:04:52; rebind 0 2022/3/27 05:04:07; expire 0 2022/3/27 08:03:53; } ~# dhclient em0 DHCPREQUEST on em0 to 255.255.255.255 port 67 DHCPACK from 100.64.0.1 bound to 100.64.122.132 -- renewal in 43130 seconds. ~# cat /var/db/dhclient.leases.em0=20 lease { interface "em0"; fixed-address 100.64.122.132; option subnet-mask 255.255.128.0; option routers 100.64.0.1; option domain-name-servers 213.143.111.122,8.8.8.8; option domain-name "ve1.innonet.at"; option dhcp-lease-time 86281; option dhcp-message-type 5; option dhcp-server-identifier 172.26.0.120; renew 6 2022/3/26 20:04:52; rebind 0 2022/3/27 05:04:07; expire 0 2022/3/27 08:03:53; } lease { interface "em0"; fixed-address 100.64.122.132; option subnet-mask 255.255.128.0; option routers 100.64.0.1; option domain-name-servers 213.143.111.122,8.8.8.8; option domain-name "ve1.innonet.at"; option dhcp-lease-time 86261; option dhcp-message-type 5; option dhcp-server-identifier 172.26.0.120; renew 6 2022/3/26 20:05:02; rebind 0 2022/3/27 05:04:06; expire 0 2022/3/27 08:03:53; } This is confusing, because the two entries are essentially the same but with different renew and rebind dates, so it remains unclear when the renew and rebind are actually scheduled to happen. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262821-227>