summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-05-29 23:39:48 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-05-29 23:39:48 +0000
commitb321b80fd597dd5bfa96fcf092f69e39824c0f19 (patch)
tree183eda3fb53f16fcf7311b63913adbcc990a4331
parent0d57721d638bf3472a5a8d8ddeab17d7d7ab605e (diff)
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;