mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 06:15:55 +00:00
Fix stupid allocation bug. Handle IFF_POINTTOPOINT only if defined
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: dispatch.c,v 1.40 1997/03/29 10:36:56 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: dispatch.c,v 1.41 1997/05/09 08:00:50 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"
|
||||||
@@ -140,7 +140,9 @@ void discover_interfaces (state)
|
|||||||
except don't skip down interfaces if we're trying to
|
except don't skip down interfaces if we're trying to
|
||||||
get a list of configurable interfaces. */
|
get a list of configurable interfaces. */
|
||||||
if ((ifr.ifr_flags & IFF_LOOPBACK) ||
|
if ((ifr.ifr_flags & IFF_LOOPBACK) ||
|
||||||
|
#ifdef IFF_POINTOPOINT
|
||||||
(ifr.ifr_flags & IFF_POINTOPOINT) ||
|
(ifr.ifr_flags & IFF_POINTOPOINT) ||
|
||||||
|
#endif
|
||||||
(!(ifr.ifr_flags & IFF_UP) &&
|
(!(ifr.ifr_flags & IFF_UP) &&
|
||||||
state != DISCOVER_UNCONFIGURED))
|
state != DISCOVER_UNCONFIGURED))
|
||||||
continue;
|
continue;
|
||||||
@@ -247,7 +249,7 @@ void discover_interfaces (state)
|
|||||||
if (!tif)
|
if (!tif)
|
||||||
error ("no space to remember ifp.");
|
error ("no space to remember ifp.");
|
||||||
memcpy (tif, ifp, len);
|
memcpy (tif, ifp, len);
|
||||||
tmp -> ifp = ifp;
|
tmp -> ifp = tif;
|
||||||
tmp -> primary_address = foo.sin_addr;
|
tmp -> primary_address = foo.sin_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user