[PATCH v2] udhcpc: add support for sending DHCPINFORM packets
Luca Boccassi
bluca at debian.org
Mon Jan 16 15:11:10 UTC 2023
On Wed, 2 Nov 2022 at 12:05, Luca Boccassi <bluca at debian.org> wrote:
>
> On Thu, 22 Sept 2022 at 13:31, Luca Boccassi <bluca at debian.org> wrote:
> >
> > On Tue, 2022-08-30 at 22:41 +0100, bluca at debian.org wrote:
> > > From: Luca Boccassi <bluca at 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 at kernel.org>
> > > Signed-off-by: Luca Boccassi <bluca at 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!
>
> Hello,
>
> One more ping for a re-review. Thank you!
Hello and happy new year,
One more ping, if you have time would love a review of v2. Thanks!
Kind regards,
Luca Boccassi
More information about the busybox
mailing list