freebsd-dev/sbin
David Bright 3acf1760b7 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>
Reviewed by:	cem, asomers, vangyzen
MFC after:	1 week
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D14527
2018-02-27 21:59:23 +00:00
..
adjkerntz various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
bsdlabel General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
camcontrol Revert ABI breakage to CAM that came in with MMC/SD support in r320844. 2018-01-19 15:32:27 +00:00
ccdconfig ccdconfig: Move VCS tags to be more consistent with our style. 2017-12-30 00:26:42 +00:00
clri Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
comcontrol various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
conscontrol various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ddb various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
decryptcore Bump date after r328535. 2018-01-29 09:27:32 +00:00
devd devd: don't pass &fds in useless parameters to select(2) 2018-02-15 03:22:53 +00:00
devfs other: Fix several typos and minor errors 2017-12-27 03:23:58 +00:00
devmatch More verbose output. 2018-02-20 05:35:00 +00:00
dhclient dhclient violates RFC2131 when sending early DHCPREQUEST message to re-obtain old IP 2018-02-27 21:59:23 +00:00
dmesg General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
dump Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
dumpfs The goal of this change is to prevent accidental foot shooting by 2018-02-08 23:06:58 +00:00
dumpon Add support for zstd-compressed user and kernel core dumps. 2018-02-13 19:28:02 +00:00
etherswitchcfg [etherswitchcfg] print the switch MAC address if provided. 2018-02-06 08:35:09 +00:00
fdisk DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ffsinfo spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
fsck various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
fsck_ffs Fix a read past the end of a buffer in fsck. 2018-02-21 20:32:23 +00:00
fsck_msdosfs Prevent OOB access on corrupted msdos directories. 2017-11-30 08:28:17 +00:00
fsdb Fix buildworld after r328075, by also renaming cgget to cglookup in 2018-01-17 13:19:37 +00:00
fsirand Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
gbde various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
geom Add GUID and alias for Apple APFS partition 2018-02-11 06:57:20 +00:00
ggate various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
growfs Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
gvinum various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
hastctl various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
hastd various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ifconfig Add support for IPv6 scoped addresses to vxlan 2017-12-30 04:03:53 +00:00
init Improve missing tty handling in init(8). This removes a check that did 2018-02-27 10:54:15 +00:00
ipf rescue ipf: Remove hacks and link in libipf directly. 2017-11-10 07:52:58 +00:00
ipfw fix typo in ipfw(8). No functional change. 2018-02-27 17:12:33 +00:00
iscontrol various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
kldconfig various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
kldload various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
kldstat various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
kldunload various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ldconfig ldconfig(8): use .Nm instead of 'ldconfig' 2018-01-09 06:51:41 +00:00
md5 DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mdconfig various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mdmfs various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mknod General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
mksnap_ffs various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mount various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mount_cd9660 General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
mount_fusefs various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mount_msdosfs various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mount_nfs General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
mount_nullfs General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
mount_udf General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
mount_unionfs General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
nandfs various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
natd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
newfs The goal of this change is to prevent accidental foot shooting by 2018-02-08 23:06:58 +00:00
newfs_msdos Only call close if fd and fd1 are not -1. 2018-01-05 05:34:14 +00:00
newfs_nandfs various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
nfsiod General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
nos-tun various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
nvmecontrol nvmecontrol: fix build on amd64/clang 2018-02-22 17:47:16 +00:00
pfctl pfctl(8): Fix two wrong conditions. 2018-01-27 22:57:01 +00:00
pflogd DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ping General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ping6 General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
quotacheck Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
rcorder various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
reboot Flesh out the reason for the need for tmpfs a little. 2017-12-20 16:02:11 +00:00
recoverdisk SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
resolvconf
restore General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
route route(8): make it possible to manually delete pinned route 2018-02-24 21:25:56 +00:00
routed When bind fails, make sure we closed the socket we tried to bind the 2017-12-28 05:34:24 +00:00
rtsol DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
savecore Prevent savecore from reading bounds from the current directory. 2018-02-16 06:51:39 +00:00
sconfig DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
setkey General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
shutdown shutdown: Fix r327476 by adding init 2018-01-02 09:02:42 +00:00
spppcontrol various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
sunlabel General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
swapon General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
sysctl Improve sysctl(8) pretty printing of some structures. 2017-11-26 10:02:43 +00:00
tests
tunefs General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
umount General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
zfsbootcfg DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
Makefile Move devmatch to sbin from usr/sbin. 2018-02-12 14:44:21 +00:00
Makefile.amd64
Makefile.arm
Makefile.i386
Makefile.inc
Makefile.mips
Makefile.powerpc64 Add bsdlabel and fdisk to powerpc64 2018-02-22 12:31:28 +00:00
Makefile.sparc64