summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-05-29 23:39:47 +0000
committermillert <millert@openbsd.org>2003-05-29 23:39:47 +0000
commit8a9011294433b52cd8b8ff602a533dba005a93c3 (patch)
tree9632487d97f917f339effafff90da0568cc807f6
parentsection reorder; (diff)
downloadwireguard-openbsd-8a9011294433b52cd8b8ff602a533dba005a93c3.tar.xz
wireguard-openbsd-8a9011294433b52cd8b8ff602a533dba005a93c3.zip
Don't reject non-DHCPNAK packets with a yiaddr of 0.0.0.0. There
are commonly used dhcp servers (like Comcast in the US) that do this. Turns out later versions of ISC dhcp dropped this check as well. It is better to be liberal in what you accept... deraadt@ OK
-rw-r--r--usr.sbin/dhcp/dhclient/dhclient.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c
index 162f100591c..67c74af97a6 100644
--- a/usr.sbin/dhcp/dhclient/dhclient.c
+++ b/usr.sbin/dhcp/dhclient/dhclient.c
@@ -729,23 +729,6 @@ void dhcp (packet)
return;
}
- if (packet->packet_type != DHCPNAK) {
- /* RFC2131 table 3 specifies that only DHCPNAK can
- * specify yiaddr of 0, Some buggy dhcp servers
- * can set yiaddr to 0 on non-DHCPNAK packets
- * we ignore those here.
- */
- struct in_addr tmp;
- memset(&tmp, 0, sizeof(struct in_addr));
-
- if (memcmp(&tmp, &packet->raw->yiaddr, sizeof(tmp)) == 0)
- {
- note("%s from %s rejected due to bogus yiaddr of 0.0.0.0.",
- type, piaddr (packet->client_addr));
- return;
- }
- }
-
/* If there's a reject list, make sure this packet's sender isn't
on it. */
for (ap = packet->interface->client->config->reject_list;