]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
When making list of IP addresses or hostnames, account for the first expression on...
authorTed Lemon <source@isc.org>
Fri, 6 Nov 1998 00:31:08 +0000 (00:31 +0000)
committerTed Lemon <source@isc.org>
Fri, 6 Nov 1998 00:31:08 +0000 (00:31 +0000)
server/confpars.c

index 49eb90d6ce0de9ac8a682957c6e7b8012c58b4a0..8f9f6613cf8117c107a062b763a033f95aa1595a 100644 (file)
@@ -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