#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"
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;
/* 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)
trace_iov_t iov [2];
#endif
+ if (no_icmp)
+ return 1;
if (!icmp_state)
log_fatal ("ICMP protocol used before initialization.");