summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcrelay
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2013-01-15 23:45:03 +0000
committerdlg <dlg@openbsd.org>2013-01-15 23:45:03 +0000
commit66698dbc29fd110d935d35e3aeb9ed66be2354c2 (patch)
tree6043c3a89baffc732e00aaff8d7ad405d8838896 /usr.sbin/dhcrelay
parentSimplify OBSD_LIB_SPEC a bit for gcc3/4. (diff)
downloadwireguard-openbsd-66698dbc29fd110d935d35e3aeb9ed66be2354c2.tar.xz
wireguard-openbsd-66698dbc29fd110d935d35e3aeb9ed66be2354c2.zip
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.c13
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",