summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-04-23 21:41:36 +0000
committerTed Lemon <source@isc.org>2001-04-23 21:41:36 +0000
commitc6f810c2d536ba90b1a4ad751b6b6597a4f7f791 (patch)
tree95bf770a9025ce2cf978dbef6b3cdf0aff0250c4
parent79ea3de8b46246c00ab606b077c0b678b67f05ee (diff)
downloadisc-dhcp-c6f810c2d536ba90b1a4ad751b6b6597a4f7f791.tar.gz
If ICMP doesn't come up, continue.
-rw-r--r--common/icmp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/common/icmp.c b/common/icmp.c
index bac43b2d..aa8463c4 100644
--- a/common/icmp.c
+++ b/common/icmp.c
@@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
-"$Id: icmp.c,v 1.29 2001/03/14 15:56:27 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: icmp.c,v 1.30 2001/04/23 21:41:36 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -59,6 +59,7 @@ struct icmp_state {
static struct icmp_state *icmp_state;
static omapi_object_type_t *dhcp_type_icmp;
+static int no_icmp;
#if defined (TRACING)
trace_type_t *trace_icmp_input;
@@ -119,8 +120,11 @@ void icmp_startup (routep, handler)
/* Get a raw socket for the ICMP protocol. */
new -> socket = socket (AF_INET, SOCK_RAW, protocol);
- if (new -> socket < 0)
- log_fatal ("unable to create icmp socket: %m");
+ if (new -> socket < 0) {
+ no_icmp = 1;
+ log_error ("unable to create icmp socket: %m");
+ return;
+ }
#if defined (HAVE_SETFD)
if (fcntl (new -> socket, F_SETFD, 1) < 0)
@@ -164,6 +168,8 @@ int icmp_echorequest (addr)
trace_iov_t iov [2];
#endif
+ if (no_icmp)
+ return 1;
if (!icmp_state)
log_fatal ("ICMP protocol used before initialization.");