summaryrefslogtreecommitdiff
path: root/common/discover.c
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2007-06-01 22:11:49 +0000
committerDavid Hankins <dhankins@isc.org>2007-06-01 22:11:49 +0000
commitf796f70a27b89d828a60e025f15bbb87635ca5c4 (patch)
treec443e33fb1ef1280f5b48b6f1059016de61d45e3 /common/discover.c
parent83f0873e5c01e7824b94fd8d27f70fe8418aeb6a (diff)
downloadisc-dhcp-f796f70a27b89d828a60e025f15bbb87635ca5c4.tar.gz
- A bug was fixed in interface discovery wherein an error identifying
a server-configured interface with no IPv4 addresses would SEGV. [ISC-Bugs #16896]
Diffstat (limited to 'common/discover.c')
-rw-r--r--common/discover.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/discover.c b/common/discover.c
index e9c7d44c..1fc46b4b 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: discover.c,v 1.58 2007/05/19 23:28:38 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n";
+"$Id: discover.c,v 1.59 2007/06/01 22:11:49 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -1054,7 +1054,9 @@ discover_interfaces(int state) {
if (local_family == AF_INET) {
log_error("No subnet declaration for %s (%s).",
tmp->name,
- inet_ntoa(tmp->addresses[0]));
+ (tmp->addresses == NULL) ?
+ "no IPv4 addresses" :
+ inet_ntoa(tmp->addresses[0]));
#ifdef DHCPv6
} else {
if (tmp->v6addresses != NULL) {
@@ -1063,7 +1065,7 @@ discover_interfaces(int state) {
abuf,
sizeof(abuf));
} else {
- strcpy(abuf, "no addresses");
+ strcpy(abuf, "no IPv6 addresses");
}
log_error("No subnet declaration for %s (%s).",
tmp->name,