[OpenWrt-Devel] [PATCH] netifd: Send DHCP release when client exits

Bjørn Mork bjorn at mork.no
Mon Apr 18 07:22:19 EDT 2016


Hans Dedecker <dedeckeh at gmail.com> writes:
> On Sun, Apr 17, 2016 at 2:07 PM, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
>> https://www.ietf.org/rfc/rfc2131.txt says in section 3.2 part 4.:
>>       Note that in this case, where the client retains its network
>>       address locally, the client will not normally relinquish its
>>       lease during a graceful shutdown.  Only in the case where the
>>       client explicitly needs to relinquish its lease, e.g., the client
>>       is about to be moved to a different subnet, will the client send
>>       a DHCPRELEASE message.
>>
> It's a bit ambiguous to interprete (like so many statements in rfc2131 :) )
> as we don't keep the IP address locally when the udhcpc client is shutdown.

I don't read it as ambigious at all.

RFC2131 clearly states that the client need not send DHCPRELEASE on
shutdown.  The exact wording is (twice - both in section 3.1 and 3.2):

     The client may choose to relinquish its lease on a network address
     by sending a DHCPRELEASE message to the server.

The "may choose" is hard to interprete in any other way than being
entirely optional.  There is nothing ambigious about that.

So the question boils down to whether automatically sending DHCPRELEASE
is an advantage or not.  I guess this might depend on your use case, but
IMHO it is definitely not.  Why would anyone want their address to
change every time they reboot the system? They don't.

I understand that there might be situations where you do want to send
DHCPRELEASE.  But that is more suitable for an explicit command.  It is
not something you want to do automatically without having precise
instructions to do so from the user.

Please do not add this bug to the DHCP client.  Thanks.



Bjørn
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list