freebsd-src/sbin
David Bright 3f63e58efb 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
2018-03-09 14:39:28 +00:00
..
adjkerntz MFC r267667: 2016-10-16 22:02:50 +00:00
atm MFC r306723: 2016-10-16 23:27:03 +00:00
badsect
bsdlabel MFC r306724: 2016-10-16 23:28:58 +00:00
camcontrol MFC r319337: 2017-07-07 15:22:29 +00:00
ccdconfig
clri MFC r306725: 2016-10-16 23:32:35 +00:00
comcontrol
conscontrol
ddb
devd MFC r320165-r320166 2017-07-31 22:28:33 +00:00
devfs MFC r314924: 2017-03-16 01:59:43 +00:00
dhclient MFC r330085: 2018-03-09 14:39:28 +00:00
dmesg
dump
dumpfs
dumpon
etherswitchcfg
fdisk MFC r306731: 2016-10-16 23:39:15 +00:00
fdisk_pc98 MFC r306732: 2016-10-16 23:44:02 +00:00
ffsinfo MFC r267667: 2016-10-16 22:02:50 +00:00
fsck MFC r306733 2017-03-30 02:38:38 +00:00
fsck_ffs MFC of 329749. 2018-02-23 23:07:41 +00:00
fsck_msdosfs MFC r326391: Prevent OOB access on corrupted msdos directories. 2017-12-14 07:55:11 +00:00
fsdb
fsirand MFC of 276737, 322200, 322201, 322271, and 322297 2017-08-24 21:44:23 +00:00
gbde MFC r292782: Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c 2017-02-27 08:27:38 +00:00
geom MFC r316535: 2017-05-30 22:33:24 +00:00
ggate MFC r267667: 2016-10-16 22:02:50 +00:00
growfs MFC r324478: 2017-10-17 15:49:36 +00:00
gvinum MFC r267667: 2016-10-16 22:02:50 +00:00
hastctl MFC r267667: 2016-10-16 22:02:50 +00:00
hastd MFC r267667: 2016-10-16 22:02:50 +00:00
ifconfig MFC r317755, r317758 2017-05-30 22:45:01 +00:00
init MFC r320761: 2017-08-02 05:47:26 +00:00
ipf
ipfw MFC r319900: 2017-07-07 15:35:42 +00:00
iscontrol
kldconfig MFC r267667: 2016-10-16 22:02:50 +00:00
kldload MFC r313273: 2017-02-12 09:27:34 +00:00
kldstat MFC r267667: 2016-10-16 22:02:50 +00:00
kldunload MFC r267667: 2016-10-16 22:02:50 +00:00
ldconfig
mca
md5 MFH (r314554): fix date in previous commit 2017-03-12 13:20:07 +00:00
mdconfig MFC r289172,r290254: 2017-02-09 22:49:48 +00:00
mdmfs
mknod
mksnap_ffs
mount MFC r316611: 2017-05-30 22:36:24 +00:00
mount_cd9660 MFC r315775: 2017-05-22 06:20:58 +00:00
mount_fusefs
mount_msdosfs MFC r306276, but don't remove findwin95 2016-10-21 17:39:05 +00:00
mount_nfs MFC: r317931 2017-05-22 21:52:06 +00:00
mount_nullfs MFC r306612: 2016-10-16 22:27:16 +00:00
mount_udf
mount_unionfs MFC r306613: 2016-10-16 22:31:51 +00:00
nandfs
natd MFC r306735: 2016-10-16 23:50:09 +00:00
newfs MFC of 276737, 322200, 322201, 322271, and 322297 2017-08-24 21:44:23 +00:00
newfs_msdos MFC of 276737, 322200, 322201, 322271, and 322297 2017-08-24 21:44:23 +00:00
newfs_nandfs MFC r314671 (by cem): 2017-04-13 17:11:50 +00:00
nfsiod
nos-tun MFC r306736: 2016-10-16 23:53:10 +00:00
nvmecontrol MFC r267667: 2016-10-16 22:02:50 +00:00
pfctl MFC r328497: 2018-02-01 02:00:36 +00:00
pflogd
ping
ping6
quotacheck
rcorder MFC r309625 2016-12-13 23:13:03 +00:00
reboot MFC r267667: 2016-10-16 22:02:50 +00:00
recoverdisk MFC r267667: 2016-10-16 22:02:50 +00:00
resolvconf
restore
route MFC r329930: route(8): make it possible to manually delete pinned route 2018-03-05 12:06:41 +00:00
routed
rtsol
savecore Relnotes: yes (subtle output/behavior change) 2017-07-19 16:38:55 +00:00
sconfig MFC r306615: 2016-10-16 22:52:05 +00:00
setkey MFC r306616 2017-03-30 02:32:38 +00:00
shutdown MFC r306617 2017-03-30 02:28:49 +00:00
spppcontrol
sunlabel
swapon MFC r315242: Fix late and noauto with geli swap 2017-03-28 10:43:20 +00:00
sysctl
tests MFC r289172,r290254: 2017-02-09 22:49:48 +00:00
tunefs
umount MFC: r308871 2016-12-03 21:56:46 +00:00
zfsbootcfg MFC r308089: zfsbootcfg: a simple tool to set next boot (one time) 2016-11-21 10:14:36 +00:00
Makefile MFC r322951: 2017-09-30 20:44:25 +00:00
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.ia64
Makefile.inc
Makefile.mips
Makefile.pc98
Makefile.sparc64