From: Ted Lemon Date: Thu, 5 Sep 1996 23:55:39 +0000 (+0000) Subject: Fix opening comment; require a subnet decl for every interface; remove warning about... X-Git-Tag: BETA_5_8~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48d507a95685950a50025f7375ebbdde11d2da17;p=thirdparty%2Fdhcp.git Fix opening comment; require a subnet decl for every interface; remove warning about missing aliases on shared networks --- diff --git a/common/dispatch.c b/common/dispatch.c index f2803c336..a3f1b68c5 100644 --- a/common/dispatch.c +++ b/common/dispatch.c @@ -1,6 +1,6 @@ -/* socket.c +/* dispatch.c - BSD socket interface code... */ + Network input dispatcher... */ /* * Copyright (c) 1995, 1996 The Internet Software Consortium. @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: dispatch.c,v 1.22 1996/09/02 21:15:17 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dispatch.c,v 1.23 1996/09/05 23:55:39 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -243,6 +243,11 @@ void discover_interfaces () memcpy (&foo, &tmp -> tif -> ifr_addr, sizeof tmp -> tif -> ifr_addr); + /* We must have a subnet declaration for each interface. */ + if (!tmp -> shared_network) + error ("No subnet declaration for %s (%s).", + tmp -> name, inet_ntoa (foo.sin_addr)); + /* Find subnets that don't have valid interface addresses... */ for (subnet = (tmp -> shared_network @@ -250,9 +255,6 @@ void discover_interfaces () : (struct subnet *)0); subnet; subnet = subnet -> next_sibling) { if (!subnet -> interface_address.len) { - warn ("subnet %s attached to interface %s %s", - piaddr (subnet -> net), tmp -> name, - "but has no alias on that network."); /* Set the interface address for this subnet to the first address we found. */ subnet -> interface_address.len = 4; diff --git a/dispatch.c b/dispatch.c index f2803c336..a3f1b68c5 100644 --- a/dispatch.c +++ b/dispatch.c @@ -1,6 +1,6 @@ -/* socket.c +/* dispatch.c - BSD socket interface code... */ + Network input dispatcher... */ /* * Copyright (c) 1995, 1996 The Internet Software Consortium. @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: dispatch.c,v 1.22 1996/09/02 21:15:17 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dispatch.c,v 1.23 1996/09/05 23:55:39 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -243,6 +243,11 @@ void discover_interfaces () memcpy (&foo, &tmp -> tif -> ifr_addr, sizeof tmp -> tif -> ifr_addr); + /* We must have a subnet declaration for each interface. */ + if (!tmp -> shared_network) + error ("No subnet declaration for %s (%s).", + tmp -> name, inet_ntoa (foo.sin_addr)); + /* Find subnets that don't have valid interface addresses... */ for (subnet = (tmp -> shared_network @@ -250,9 +255,6 @@ void discover_interfaces () : (struct subnet *)0); subnet; subnet = subnet -> next_sibling) { if (!subnet -> interface_address.len) { - warn ("subnet %s attached to interface %s %s", - piaddr (subnet -> net), tmp -> name, - "but has no alias on that network."); /* Set the interface address for this subnet to the first address we found. */ subnet -> interface_address.len = 4;