diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-01-15 23:45:04 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-01-15 23:45:04 +0000 |
commit | 222faf1403f48ae9b3bba9ed20b856a0bcb512bc (patch) | |
tree | fb013dcf8e009861858186fa80a9de5602263ae1 /usr.sbin/dhcrelay | |
parent | 00eeb8c824e8e9c4ff1d9d42201a1760b455a309 (diff) |
VMware PXE "ROMs" confuse the DHCP gateway address with the IP
gateway address. This is a problem if your DHCP relay is running
on something that's not your network gateway.
It is purely informational from the relay to the client so we can
safely clear it.
stupid vmware.
ok krw@ beck@
Diffstat (limited to 'usr.sbin/dhcrelay')
-rw-r--r-- | usr.sbin/dhcrelay/dhcrelay.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/dhcrelay/dhcrelay.c b/usr.sbin/dhcrelay/dhcrelay.c index 4d02aa624e8..a2f39d0a13f 100644 --- a/usr.sbin/dhcrelay/dhcrelay.c +++ b/usr.sbin/dhcrelay/dhcrelay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcrelay.c,v 1.36 2012/06/22 11:28:36 krw Exp $ */ +/* $OpenBSD: dhcrelay.c,v 1.37 2013/01/15 23:45:03 dlg Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org> @@ -269,6 +269,17 @@ relay(struct interface_info *ip, struct dhcp_packet *packet, int length, return; } + /* + * VMware PXE "ROMs" confuse the DHCP gateway address + * with the IP gateway address. This is a problem if your + * DHCP relay is running on something that's not your + * network gateway. + * + * It is purely informational from the relay to the client + * so we can safely clear it. + */ + packet->giaddr.s_addr = 0x0; + if (send_packet(interfaces, packet, length, interfaces->primary_address, &to, &hto) != -1) debug("forwarded BOOTREPLY for %s to %s", |