mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-02 15:25:48 +00:00
Don't NAK leases from competing servers
This commit is contained in:
8
dhcp.c
8
dhcp.c
@@ -3,7 +3,7 @@
|
|||||||
DHCP Protocol engine. */
|
DHCP Protocol engine. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 1996 The Internet Software Consortium.
|
* Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: dhcp.c,v 1.39 1997/02/22 10:22:05 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: dhcp.c,v 1.40 1997/02/22 12:25:11 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -191,9 +191,9 @@ void dhcprequest (packet)
|
|||||||
: packet -> interface -> name);
|
: packet -> interface -> name);
|
||||||
|
|
||||||
/* If we found a lease for the client but it's not the one the
|
/* If we found a lease for the client but it's not the one the
|
||||||
client asked for, NAK it. */
|
client asked for, don't send it - some other server probably
|
||||||
|
made the cut. */
|
||||||
if (lease && !addr_eq (lease -> ip_addr, cip)) {
|
if (lease && !addr_eq (lease -> ip_addr, cip)) {
|
||||||
nak_lease (packet, &cip);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
DHCP Protocol engine. */
|
DHCP Protocol engine. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 1996 The Internet Software Consortium.
|
* Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: dhcp.c,v 1.39 1997/02/22 10:22:05 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: dhcp.c,v 1.40 1997/02/22 12:25:11 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -191,9 +191,9 @@ void dhcprequest (packet)
|
|||||||
: packet -> interface -> name);
|
: packet -> interface -> name);
|
||||||
|
|
||||||
/* If we found a lease for the client but it's not the one the
|
/* If we found a lease for the client but it's not the one the
|
||||||
client asked for, NAK it. */
|
client asked for, don't send it - some other server probably
|
||||||
|
made the cut. */
|
||||||
if (lease && !addr_eq (lease -> ip_addr, cip)) {
|
if (lease && !addr_eq (lease -> ip_addr, cip)) {
|
||||||
nak_lease (packet, &cip);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user