Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/dist/dhcp/common Pull up revision 1.6 (requested by abs...



details:   https://anonhg.NetBSD.org/src/rev/10cebde19c70
branches:  netbsd-1-6
changeset: 530344:10cebde19c70
user:      grant <grant%NetBSD.org@localhost>
date:      Thu Jun 19 00:56:49 2003 +0000

description:
Pull up revision 1.6 (requested by abs in ticket #1292):

Skip !IFF_BROADCAST interfaces (such as strip). After discussion
with Ted Lemon leave in checks for IFF_LOOPBACK and IFF_POINTTOPOINT
in case an OS incorrectly marks them with IFF_BROADCAST.
Patch submitted back to dhcp-server%isc.org@localhost

diffstat:

 dist/dhcp/common/discover.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 05022f49848e -r 10cebde19c70 dist/dhcp/common/discover.c
--- a/dist/dhcp/common/discover.c       Thu Jun 19 00:35:15 2003 +0000
+++ b/dist/dhcp/common/discover.c       Thu Jun 19 00:56:49 2003 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: discover.c,v 1.2 2001/08/03 13:07:04 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: discover.c,v 1.2.4.1 2003/06/19 00:56:49 grant Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -269,10 +269,12 @@
                        if (!strcmp (tmp -> name, ifp -> ifr_name))
                                break;
 
-               /* Skip loopback, point-to-point and down interfaces,
-                  except don't skip down interfaces if we're trying to
-                  get a list of configurable interfaces. */
-               if (((ifr.ifr_flags & IFF_LOOPBACK ||
+               /* Skip non broadcast interfaces (plus loopback and
+                  point-to-point in case an OS incorrectly marks them
+                  as broadcast). Also skip down interfaces unless we're
+                  trying to get a list of configurable interfaces. */
+               if (((!(ifr.ifr_flags & IFF_BROADCAST) ||
+                     ifr.ifr_flags & IFF_LOOPBACK ||
                      ifr.ifr_flags & IFF_POINTOPOINT) && !tmp) ||
                    (!(ifr.ifr_flags & IFF_UP) &&
                     state != DISCOVER_UNCONFIGURED))



Home | Main Index | Thread Index | Old Index