summaryrefslogtreecommitdiff
path: root/common/conflex.c
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2009-07-06 23:29:52 +0000
committerDavid Hankins <dhankins@isc.org>2009-07-06 23:29:52 +0000
commit33ea4622a865e0cc545c7d89d2b222e1198e9ac3 (patch)
treec5284ed5b090a669eed653156743f446ebcf78cf /common/conflex.c
parent8ef5db715e202470cece3c62750aafe5a475594b (diff)
downloadisc-dhcp-33ea4622a865e0cc545c7d89d2b222e1198e9ac3.tar.gz
- Added a configuration function, 'gethostname()', which calls the system
function of the same name and presents the results as a data expression. This function can be used to incorporate the system level hostname of the system the DHCP software is operating on in responses or queries (such as including a failover partner's hostname in a dhcp message or binding scope, or having a DHCP client send any system hostname in the host-name or FQDN options by default). [ISC-Bugs #17351]
Diffstat (limited to 'common/conflex.c')
-rw-r--r--common/conflex.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/conflex.c b/common/conflex.c
index 2ce94840..41edb89a 100644
--- a/common/conflex.c
+++ b/common/conflex.c
@@ -984,12 +984,17 @@ intern(char *atom, enum dhcp_token dfv) {
return TOKEN_FREE;
break;
case 'g':
+ if (!strncasecmp(atom + 1, "et", 2)) {
+ if (!strcasecmp(atom + 3, "-lease-hostnames"))
+ return GET_LEASE_HOSTNAMES;
+ if (!strcasecmp(atom + 3, "hostname"))
+ return GETHOSTNAME;
+ break;
+ }
if (!strcasecmp (atom + 1, "iaddr"))
return GIADDR;
if (!strcasecmp (atom + 1, "roup"))
return GROUP;
- if (!strcasecmp (atom + 1, "et-lease-hostnames"))
- return GET_LEASE_HOSTNAMES;
break;
case 'h':
if (!strcasecmp(atom + 1, "ash"))