#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.45 2000/06/02 21:26:55 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.46 2000/06/12 20:08:56 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
int token;
const char *val;
struct client_state *client, **cp;
- struct interface_info *ip;
+ struct interface_info *ip = (struct interface_info *)0;
token = next_token (&val, cfile);
if (token != STRING) {
return;
}
- interface_or_dummy (&ip, val);
+ if (!interface_or_dummy (&ip, val))
+ log_fatal ("Can't allocate interface %s.", val);
/* If we were given a name, this is a pseudo-interface. */
if (name) {
{
struct interface_info *i;
struct interface_info *ip = (struct interface_info *)0;
+ isc_result_t status;
/* Find the interface (if any) that matches the name. */
for (i = interfaces; i; i = i -> next) {
interface_reference (&dummy_interfaces, ip, MDL);
}
if (pi)
- interface_reference (pi, ip, MDL);
+ status = interface_reference (pi, ip, MDL);
interface_dereference (&ip, MDL);
+ if (status != ISC_R_SUCCESS)
+ return 0;
return 1;
}