Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
      (Darren Ankney)
   2. Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
      (vom513)
   3. Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
      (Darren Ankney)
   4. Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
      (vom513)


----------------------------------------------------------------------

Message: 1
Date: Sun, 22 Jan 2023 08:33:06 -0500
From: Darren Ankney <darren.ank...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
Message-ID: <610f6d88-38d1-4bcc-84e4-77ee8f853...@gmail.com>
Content-Type: text/plain;       charset=utf-8

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.

> On Jan 21, 2023, at 5:29 AM, vom513 <vom...@gmail.com> wrote:
> 
> Hello all,
> 
> So this seems to have been covered multiple times on the list and other 
> various places.  However, I don?t see a solution (assuming that there is 
> one).  Most of the google hits I get are folks with extremely strict firewall 
> rules that end up blocking this outbound packet.  That doesn?t apply to me - 
> I run nftables and I don?t have an ?output? policy doing anything.
> 
> This is a Debian 11 (bullseye) machine - it?s my firewall.  dhclient is from 
> the isc-dhcp-client package with version 4.4.1-2.3+deb11u1, and kernel is 
> 5.10.0.
> 
> So while this doesn?t actually *break* anything per se - it certainly drives 
> me crazy not knowing what?s happening and how to fix it.
> 
> It seems like perhaps a race condition ?  Could it be that the interface is 
> ?down? and then dhclient tries to send the RELEASE ?  I see this essentially 
> when I do an ?ifdown?.  However - I don?t see it 100% of the time :/
> 
> --
> Jan 21 04:17:30 ice dhclient[303659]: DHCPRELEASE of 1.1.1.1 on enp1s0f4 to 
> 2.2.2.2 port 67
> Jan 21 04:17:30 ice dhclient[303659]: send_packet: Invalid argument
> Jan 21 04:17:30 ice dhclient[303659]: dhclient.c:2879: Failed to send 300 
> byte long packet over fallback interface.
> ?
> 
> I even added logging to my input ?clean up? rule in nftables - I recreated 
> this issue and I saw nothing in logs to indicate any packets were 
> dropped/denied.
> 
> Thanks in advance for any info.
> 
> PS: I know this message is very Debian heavy.  I?m certainly willing to jump 
> on a Debian mailing list/forum/bugtracker etc. if need be.  I just figured I 
> would start here.  I also figured that if this were a Debian bug - surely 
> this would have been addressed long ago ?
> 
> -- 
> 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
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



------------------------------

Message: 2
Date: Sun, 22 Jan 2023 13:19:38 -0500
From: vom513 <vom...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
Message-ID: <6190d282-b799-4522-b880-9a2180cc0...@gmail.com>
Content-Type: text/plain;       charset=utf-8

> On Jan 22, 2023, at 8:33 AM, Darren Ankney <darren.ank...@gmail.com> 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 ?



------------------------------

Message: 3
Date: Sun, 22 Jan 2023 14:18:42 -0500
From: Darren Ankney <darren.ank...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
Message-ID: <6ba04572-df31-47dd-ba48-9d8eb2267...@gmail.com>
Content-Type: text/plain;       charset=utf-8

That doesn?t look like ?c? to me.  Looks more like some kind of shell script.  
I?m not super familiar with dhclient, but it probably does block until it is 
done with whatever it is doing as most programs do.  

I?d definitely say to go ask about this on a Debian list as this is not really 
much to do with dhclient and more to do with how Debian is shutting down the 
interface.

> On Jan 22, 2023, at 1:19 PM, vom513 <vom...@gmail.com> wrote:
> 
>> On Jan 22, 2023, at 8:33 AM, Darren Ankney <darren.ank...@gmail.com> 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
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



------------------------------

Message: 4
Date: Sun, 22 Jan 2023 16:12:46 -0500
From: vom513 <vom...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: dhclient failed to send packet (DHCPRELEASE) on Debian 11
Message-ID: <f2a5710f-c79f-4fbc-845d-929d77d2c...@gmail.com>
Content-Type: text/plain;       charset=utf-8


> On Jan 22, 2023, at 2:18 PM, Darren Ankney <darren.ank...@gmail.com> wrote:
> 
> That doesn?t look like ?c? to me.  Looks more like some kind of shell script. 
>  I?m not super familiar with dhclient, but it probably does block until it is 
> done with whatever it is doing as most programs do.  
> 
> I?d definitely say to go ask about this on a Debian list as this is not 
> really much to do with dhclient and more to do with how Debian is shutting 
> down the interface.

Yep, heading there now.  Thanks for looking at this.

PS: For posterity sake - these .defn files are transformed to C by the 
defn2c.pl script included in the source tree:

--
vom@ice:/tmp/ifupdown$ ./defn2c.pl inet.defn  
#include <stddef.h>
#include "header.h"


#include "archcommon.h"
#include "archlinux.h"


static option_default _loopback_default[] = {
{ NULL, NULL }
};
<snip>

------------------------------

Subject: Digest Footer

_______________________________________________
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
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

End of dhcp-users Digest, Vol 170, Issue 3
******************************************

Reply via email to