]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r330085:
authordab <dab@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 9 Mar 2018 14:39:28 +0000 (14:39 +0000)
committerdab <dab@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 9 Mar 2018 14:39:28 +0000 (14:39 +0000)
commit76cdccb19eee88c95390970499f51e6daac5459c
treeb42283229cf98e1d0af814127b9629233cd1083e
parent44d3660c44f17298cd01f2ed1a626cb94c11edfa
MFC r330085:

dhclient violates RFC2131 when sending early DHCPREQUEST message to re-obtain old IP

When dhclient first starts, if an old IP address exists in the
dhclient.leases file, dhclient(8) sends early DHCPREQUEST message(s)
in an attempt to re-obtain the old IP address again. These messages
contain the old IP as a requested-IP-address option in the message
body (correct) but also use the old IP address as the packet's source
IP (incorrect).

RFC2131 sec 4.1 states:

  DHCP messages broadcast by a client prior to that client obtaining
  its IP address must have the source address field in the IP header
  set to 0.

The use of the old IP as the packet's source address is incorrect if
(a) the computer is now on a different network or (b) it is on the
same network, but the old IP has been reallocated to another host.

Fix dhclient to use 0.0.0.0 as the source IP in this circumstance
without removing any existing functionality. Any previously-used old
IP is still requested in the body of an early DHCPREQUEST message.

PR:             199378
Submitted by:   J.R. Oldroyd <fbsd@opal.com>
Reported by:    J.R. Oldroyd <fbsd@opal.com>
Sponsored by:   Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@330693 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/dhclient/dhclient.c