diff options
author | 2013-02-14 22:06:13 +0000 | |
---|---|---|
committer | 2013-02-14 22:06:13 +0000 | |
commit | e4a7785ec2bcb874a5d921c3580bc60a4d464ffd (patch) | |
tree | 241485e010a1ab31a7e5c018e07a387da53ea480 /usr.sbin/dhcpd/dhcp.c | |
parent | Correct error message that had a typo and was logging the wrong thing; (diff) | |
download | wireguard-openbsd-e4a7785ec2bcb874a5d921c3580bc60a4d464ffd.tar.xz wireguard-openbsd-e4a7785ec2bcb874a5d921c3580bc60a4d464ffd.zip |
Obey RFC 2131 and when the broadcast flag is set send reply back
via udp broadcast and link-local broadcast. Not udp broadcast to
link address of client. Fixes at least some switches who
use the broadcast flag.
Bug submitted by Andy via bugs@, and fix tested by same. Thanks!
ok beck@
Diffstat (limited to 'usr.sbin/dhcpd/dhcp.c')
-rw-r--r-- | usr.sbin/dhcpd/dhcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/dhcp.c b/usr.sbin/dhcpd/dhcp.c index 02fdfc514e3..b9c78814c50 100644 --- a/usr.sbin/dhcpd/dhcp.c +++ b/usr.sbin/dhcpd/dhcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp.c,v 1.32 2010/03/29 22:22:28 krw Exp $ */ +/* $OpenBSD: dhcp.c,v 1.33 2013/02/14 22:06:13 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -1352,6 +1352,7 @@ dhcp_reply(struct lease *lease) } else { to.sin_addr.s_addr = htonl(INADDR_BROADCAST); to.sin_port = client_port; + memset(&state->haddr, 0xff, sizeof state->haddr); } memcpy(&from, state->from.iabuf, sizeof from); |