[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH v2] udhcpc: add support for sending DHCPINFORM packets
From:       Luca Boccassi <bluca () debian ! org>
Date:       2022-09-22 12:31:09
Message-ID: 530912df10d28daa536b94d7b6efa814c4e41200.camel () debian ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tue, 2022-08-30 at 22:41 +0100, bluca@debian.org wrote:
> From: Luca Boccassi <bluca@debian.org>
> 
> It is useful for applications to be able to query DHCP options
> without renewing IP address. Instead of a full DHCP handshake,
> using -I will cause a single DHCPINFORM packet to be sent, and
> the server response (including DHCP options received) to be
> printed and terminate. No configuration will be changed.
> 
> This is useful for clients that want to query additional information
> from a server, that might not be normally processed, like custom
> server options. Also useful for checking specific options via -O.
> 
> As per RFC 2131, allow targeting the already-known DHCP server via
> unicast instead of broadcast, via new -e option.
> 
> Tested by running isc-dhcp-server with the following configuration:
> 
> option domain-name "example.org";
> option domain-name-servers 1.1.1.1, 8.8.8.8;
> subnet 192.168.11.0 netmask 255.255.255.0 {
>     range 192.168.11.1 192.168.11.100;
>     authoritative;
>     option default-url "default.url";
> }
> 
> $ busybox udhcpc -I -i host0 -O 114 -r 192.168.11.1
> udhcpc: started, v1.36.0.git
> udhcpc: broadcasting inform for 192.168.11.1, server 0.0.0.0
> udhcpc: lease of 0.0.0.0 obtained from 0.0.0.0, lease time 3600 (default)
> udhcpc: option: opt53=0x05
> udhcpc: option: serverid=192.168.11.101
> udhcpc: option: subnet=255.255.255.0
> udhcpc: option: dns=1.1.1.1 8.8.8.8
> udhcpc: option: domain=example.org
> udhcpc: option: opt114=0x64656661756c742e75726c
> 
> $ busybox udhcpc -e 192.168.11.101 -I -i host0 -O 114 -r 192.168.11.1
> udhcpc: started, v1.36.0.git
> udhcpc: unicasting inform for 192.168.11.1, server 192.168.11.101
> udhcpc: lease of 0.0.0.0 obtained from 192.168.11.101, lease time 3600 (default)
> udhcpc: option: opt53=0x05
> udhcpc: option: serverid=192.168.11.101
> udhcpc: option: subnet=255.255.255.0
> udhcpc: option: dns=1.1.1.1 8.8.8.8
> udhcpc: option: domain=example.org
> udhcpc: option: opt114=0x64656661756c742e75726c
> 
> Co-authored-by: Sinan Kaya <okaya@kernel.org>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> v2: updated commit message and comments
>         applied all review comments
>         print received DHCP options and exit
> 
>   networking/udhcp/dhcpc.c | 116 ++++++++++++++++++++++++++++++++++-----
>   1 file changed, 103 insertions(+), 13 deletions(-)

Hello Denys,

Any chance for a second review? Thank you!

-- 
Kind regards,
Luca Boccassi

["signature.asc" (application/pgp-signature)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic