Bug 14456

Summary: DHCP Client: DHCPNAK behavior
Product: Busybox Reporter: Vitaliy Orazov <viordash>
Component: NetworkingAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Vitaliy Orazov 2021-12-14 15:35:34 UTC
Hi!
 
Faced with the issue of not responding to DHCPNAK from another server, I then compared the behavior between busybox udhcp client and isc dhclient when receiving DHCPNAK. And behaviors are different. Your client checks for server_id matching, this check was introduced for the fix, Bug 4267.
But in isc dhclient there is no check for server_id and it seems to me correct, because in rfc2131 I did not find requirements for matching server_id in the request for the client, but I found the following text:
---------------
RFC 2131   [Page 17]
If the client receives a DHCPNAK message, the client restarts the
     configuration process.
---------------
 
Here is another piece of text from rfc2131, which I believe points to the key moment of using server_id in the client:
---------------
RFC 2131   [Page 23]
DHCP clients MUST
   use the IP address provided in the 'server identifier' option for any
   unicast requests to the DHCP server.
---------------
 
this is also consistent with rfc2132:
---------------
RFC 2132   [Page 27]
DHCP clients use the
   contents of the 'server identifier' field as the destination address
   for any DHCP messages unicast to the DHCP server.
---------------