]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix stupid allocation bug. Handle IFF_POINTTOPOINT only if defined
authorTed Lemon <source@isc.org>
Fri, 9 May 1997 08:00:50 +0000 (08:00 +0000)
committerTed Lemon <source@isc.org>
Fri, 9 May 1997 08:00:50 +0000 (08:00 +0000)
common/dispatch.c

index 209d88604292d0bef99ee7af09b015dec97c4057..8a66af03cced7e6153a0cda2aaf80da6c527b794 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 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 */
 
 #include "dhcpd.h"
@@ -140,7 +140,9 @@ void discover_interfaces (state)
                   except don't skip down interfaces if we're trying to
                   get a list of configurable interfaces. */
                if ((ifr.ifr_flags & IFF_LOOPBACK) ||
+#ifdef IFF_POINTOPOINT
                    (ifr.ifr_flags & IFF_POINTOPOINT) ||
+#endif
                    (!(ifr.ifr_flags & IFF_UP) &&
                     state != DISCOVER_UNCONFIGURED))
                        continue;
@@ -247,7 +249,7 @@ void discover_interfaces (state)
                                if (!tif)
                                        error ("no space to remember ifp.");
                                memcpy (tif, ifp, len);
-                               tmp -> ifp = ifp;
+                               tmp -> ifp = tif;
                                tmp -> primary_address = foo.sin_addr;
                        }