On Tue, 2022-08-30 at 22:41 +0100, [email protected] wrote: > From: Luca Boccassi <[email protected]> > > 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 <[email protected]> > Signed-off-by: Luca Boccassi <[email protected]> > --- > 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
Description: This is a digitally signed message part
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
