summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcpd/dhcp.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2013-03-22 23:45:52 +0000
committerkrw <krw@openbsd.org>2013-03-22 23:45:52 +0000
commit3fd9b1749996c9e80503e95710d046ab284bcac7 (patch)
tree47111e777941b77d1144a6320a94f453d97df5d4 /usr.sbin/dhcpd/dhcp.c
parentMove i915_gem_gtt_map_ioctl() from i915_drv.c to i915_gem.c and rename it (diff)
downloadwireguard-openbsd-3fd9b1749996c9e80503e95710d046ab284bcac7.tar.xz
wireguard-openbsd-3fd9b1749996c9e80503e95710d046ab284bcac7.zip
RFC 2131 4.3.1 seems clear that a server MUST NOT include the
client-identifier option in OFFER or ACK messages. So stop doing so.
Diffstat (limited to 'usr.sbin/dhcpd/dhcp.c')
-rw-r--r--usr.sbin/dhcpd/dhcp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/dhcpd/dhcp.c b/usr.sbin/dhcpd/dhcp.c
index b265c4a2e4a..f0a85b0550f 100644
--- a/usr.sbin/dhcpd/dhcp.c
+++ b/usr.sbin/dhcpd/dhcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcp.c,v 1.34 2013/03/11 15:43:38 krw Exp $ */
+/* $OpenBSD: dhcp.c,v 1.35 2013/03/22 23:45:52 krw Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 1998, 1999
@@ -1185,6 +1185,10 @@ ack_lease(struct packet *packet, struct lease *lease, unsigned int offer,
state->options[i]->tree = NULL;
}
+ /* RFC 2131: MUST NOT send client identifier option in OFFER/ACK! */
+ i = DHO_DHCP_CLIENT_IDENTIFIER;
+ memset(&state->options[i], 0, sizeof(state->options[i]));
+
lease->state = state;
/* If this is a DHCPOFFER, ping the lease address before actually