From: Ted Lemon Date: Fri, 6 Nov 1998 00:31:08 +0000 (+0000) Subject: When making list of IP addresses or hostnames, account for the first expression on... X-Git-Tag: carrel-2~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=028a8588da37c7385d2ed34cd5abf07eec7ca51e;p=thirdparty%2Fdhcp.git When making list of IP addresses or hostnames, account for the first expression on the list. --- diff --git a/server/confpars.c b/server/confpars.c index 49eb90d6c..8f9f6613c 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: confpars.c,v 1.52 1998/11/06 00:16:52 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: confpars.c,v 1.53 1998/11/06 00:31:08 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -967,15 +967,18 @@ int parse_fixed_addr_param (oc, cfile) do { tmp = (struct expression *)0; if (parse_ip_addr_or_hostname (&tmp, cfile, 1)) { - new = (struct expression *)0; - status = make_concat (&new, expr, tmp); - expression_dereference (&expr, - "parse_fixed_addr_param"); - expression_dereference (&tmp, - "parse_fixed_addr_param"); - if (status) - return 0; - expr = new; + if (expr) { + new = (struct expression *)0; + status = make_concat (&new, expr, tmp); + expression_dereference + (&expr, "parse_fixed_addr_param"); + expression_dereference + (&tmp, "parse_fixed_addr_param"); + if (status) + return 0; + expr = new; + } else + expr = tmp; } else { if (expr) expression_dereference