From c0a8b01162cde669faadeaf16c75c64820a45f6c Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Sun, 15 Mar 1998 20:47:27 +0000 Subject: [PATCH] Don't invalidate a lease if we receive an ICMP echo reply for it when it has a valid lease. This can happen if some other user on the host pings the client after we've assigned it an address. --- server/dhcpd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/dhcpd.c b/server/dhcpd.c index 258f9822..8e14b034 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -42,7 +42,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhcpd.c,v 1.46 1998/02/06 01:10:28 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium."; +"$Id: dhcpd.c,v 1.47 1998/03/15 20:47:27 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium."; #endif static char copyright[] = @@ -329,6 +329,11 @@ void lease_pinged (from, packet, length) return; } + if (lp -> ends > cur_time) { + warn ("ICMP Echo reply arrived while lease %s was valid.\n", + piaddr (from)); + } + /* At this point it looks like we pinged a lease and got a response, which shouldn't have happened. */ free_lease_state (lp -> state, "lease_pinged");