diff options
author | 2005-11-22 21:33:56 +0000 | |
---|---|---|
committer | 2005-11-22 21:33:56 +0000 | |
commit | b450f114c799f42f08daedb93d07435dd6871678 (patch) | |
tree | 9f932291f21d3c190d45cbb1cb135d7ad865c775 /usr.sbin/dhcpd/dhcp.c | |
parent | Recognize hd as disk drives. (diff) | |
download | wireguard-openbsd-b450f114c799f42f08daedb93d07435dd6871678.tar.xz wireguard-openbsd-b450f114c799f42f08daedb93d07435dd6871678.zip |
fix problem of dhcp server looping with "already acking lease"
when busy with short lease times. Fix by and discussed with millert
over a year ago, run at u of a for over a year, but never committed.
ok millert@ cloder@
Diffstat (limited to 'usr.sbin/dhcpd/dhcp.c')
-rw-r--r-- | usr.sbin/dhcpd/dhcp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/dhcpd/dhcp.c b/usr.sbin/dhcpd/dhcp.c index a453cc270b4..0b0bbddc9f7 100644 --- a/usr.sbin/dhcpd/dhcp.c +++ b/usr.sbin/dhcpd/dhcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp.c,v 1.19 2005/01/31 22:21:44 claudio Exp $ */ +/* $OpenBSD: dhcp.c,v 1.20 2005/11/22 21:33:56 beck Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -596,8 +596,13 @@ ack_lease(struct packet *packet, struct lease *lease, unsigned int offer, /* If we're already acking this lease, don't do it again. */ if (lease->state) { - note("already acking lease %s", piaddr(lease->ip_addr)); - return; + if ((lease->flags & STATIC_LEASE) || + cur_time - lease->timestamp < 60) { + note("already acking lease %s", piaddr(lease->ip_addr)); + return; + } + free_lease_state(lease->state, "ACK timed out"); + lease->state = NULL; } if (packet->options[DHO_DHCP_CLASS_IDENTIFIER].len) { |