mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 14:55:30 +00:00
Allow trailing dot in hostnames.
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: parse.c,v 1.4 1998/03/15 21:16:23 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: parse.c,v 1.5 1998/03/17 06:13:02 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -149,12 +149,11 @@ char *parse_host_name (cfile)
|
|||||||
/* Read a dotted hostname... */
|
/* Read a dotted hostname... */
|
||||||
do {
|
do {
|
||||||
/* Read a token, which should be an identifier. */
|
/* Read a token, which should be an identifier. */
|
||||||
|
token = peek_token (&val, cfile);
|
||||||
|
if (!is_identifier (token) && token != NUMBER)
|
||||||
|
break;
|
||||||
token = next_token (&val, cfile);
|
token = next_token (&val, cfile);
|
||||||
if (!is_identifier (token) && token != NUMBER) {
|
|
||||||
parse_warn ("expecting an identifier in hostname");
|
|
||||||
skip_to_semi (cfile);
|
|
||||||
return (char *)0;
|
|
||||||
}
|
|
||||||
/* Store this identifier... */
|
/* Store this identifier... */
|
||||||
if (!(s = (char *)malloc (strlen (val) + 1)))
|
if (!(s = (char *)malloc (strlen (val) + 1)))
|
||||||
error ("can't allocate temp space for hostname.");
|
error ("can't allocate temp space for hostname.");
|
||||||
|
Reference in New Issue
Block a user