Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
vom513 <[email protected]> Sun, 22 Jan 2023 13:19:38 -0500
| Newsgroups | gmane.network.dhcp.isc.dhcp-server |
|---|---|
| Message-ID | <6190D282-B799-4522-B880-9A2180CC04BA__30099.9471962982$1674411611$gmane$org@gmail.com> |
> On Jan 22, 2023, at 8:33 AM, Darren Ankney <[email protected]> wrote: > > I would say to take this to a Debian mailing list. dhclient is being commanded by Debian to send a release. I think you are probably right about it being a timing issue (ie: sometimes trying to send after the interface is down). You could probably find a shell script somewhere that is actually performing these actions and maybe even fix it. Then you’d have something to show the Debian developers as well. > Thanks for the reply. I probably will go check out some Debian resources. However, in the source for the “ifupdown” package from Debian, I believe I found the section that calls dhclient to release. Looks like this is a “defn” file that gets translated to C ? (I’ve never ran into one of these files before…). So that means the instructions and arguments for dhclient are actually compiled into ifup (ifdown is a symlink to ifup). Check it out: — down CLIENT="-i"; [[[ "%client%" = no ] && CLIENT="";]] dhclient -4 -v $CLIENT -r -pf /run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases -I -df /var/lib/dhcp/dhclient6.%iface%.leases %iface% \ if (execable("dhclient")) if test -f /run/udhcpc.%iface%.pid; then kill -USR2 $(cat /run/udhcpc.%iface%.pid); kill -TERM $(cat /run/udhcpc.%iface%.pid); fi \ elsif (execable("udhcpc")) dhcpcd -k %iface% \ elsif (execable("dhcpcd")) echo 'No DHCP client software found!' >&2; false \ elsif (1) ip link set dev %iface% down \ if (iface_is_link()) — Looks to me like the interface isn’t brought down till after dhclient is ran with “-r” (release) ? So perhaps not a race condition - at least in the traditional way of thinking ? I don’t think dhclient immediately returns/exits does it ? It does it’s thing and prints to STDOUT I would think ? So if that’s true (someone please correct me if I’m wrong on this) - the command to take the interface down shouldn’t happen till after dhclient is done ? -- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. dhcp-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/dhcp-users