mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 14:25:41 +00:00
Add a few keywords; fix case botch
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"@(#) Copyright (c) 1995 The Internet Software Consortium. All rights reserved.\n";
|
"@(#) Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -270,7 +270,10 @@ static int intern (atom, dfv)
|
|||||||
char *atom;
|
char *atom;
|
||||||
int dfv;
|
int dfv;
|
||||||
{
|
{
|
||||||
switch (atom [0]) {
|
if (!isascii (atom [0]))
|
||||||
|
return dfv;
|
||||||
|
|
||||||
|
switch (tolower (atom [0])) {
|
||||||
case 'c':
|
case 'c':
|
||||||
if (!strcasecmp (atom + 1, "lass"))
|
if (!strcasecmp (atom + 1, "lass"))
|
||||||
return CLASS;
|
return CLASS;
|
||||||
@@ -280,6 +283,8 @@ static int intern (atom, dfv)
|
|||||||
case 'd':
|
case 'd':
|
||||||
if (!strcasecmp (atom + 1, "efault-lease-time"))
|
if (!strcasecmp (atom + 1, "efault-lease-time"))
|
||||||
return DEFAULT_LEASE_TIME;
|
return DEFAULT_LEASE_TIME;
|
||||||
|
if (!strcasecmp (atom + 1, "ynamic-bootp"))
|
||||||
|
return DYNAMIC_BOOTP;
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
if (!strcasecmp (atom + 1, "thernet"))
|
if (!strcasecmp (atom + 1, "thernet"))
|
||||||
@@ -334,9 +339,15 @@ static int intern (atom, dfv)
|
|||||||
return SIADDR;
|
return SIADDR;
|
||||||
if (!strcasecmp (atom + 1, "ubnet"))
|
if (!strcasecmp (atom + 1, "ubnet"))
|
||||||
return SUBNET;
|
return SUBNET;
|
||||||
|
if (!strcasecmp (atom + 1, "hared-network"))
|
||||||
|
return SHARED_NETWORK;
|
||||||
|
if (!strcasecmp (atom + 1, "erver-name"))
|
||||||
|
return SERVER_NAME;
|
||||||
|
if (!strcasecmp (atom + 1, "erver-identifier"))
|
||||||
|
return SERVER_IDENTIFIER;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
if (!strcasecmp (atom + 1, "timestamp"))
|
if (!strcasecmp (atom + 1, "imestamp"))
|
||||||
return TIMESTAMP;
|
return TIMESTAMP;
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
|
17
conflex.c
17
conflex.c
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"@(#) Copyright (c) 1995 The Internet Software Consortium. All rights reserved.\n";
|
"@(#) Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -270,7 +270,10 @@ static int intern (atom, dfv)
|
|||||||
char *atom;
|
char *atom;
|
||||||
int dfv;
|
int dfv;
|
||||||
{
|
{
|
||||||
switch (atom [0]) {
|
if (!isascii (atom [0]))
|
||||||
|
return dfv;
|
||||||
|
|
||||||
|
switch (tolower (atom [0])) {
|
||||||
case 'c':
|
case 'c':
|
||||||
if (!strcasecmp (atom + 1, "lass"))
|
if (!strcasecmp (atom + 1, "lass"))
|
||||||
return CLASS;
|
return CLASS;
|
||||||
@@ -280,6 +283,8 @@ static int intern (atom, dfv)
|
|||||||
case 'd':
|
case 'd':
|
||||||
if (!strcasecmp (atom + 1, "efault-lease-time"))
|
if (!strcasecmp (atom + 1, "efault-lease-time"))
|
||||||
return DEFAULT_LEASE_TIME;
|
return DEFAULT_LEASE_TIME;
|
||||||
|
if (!strcasecmp (atom + 1, "ynamic-bootp"))
|
||||||
|
return DYNAMIC_BOOTP;
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
if (!strcasecmp (atom + 1, "thernet"))
|
if (!strcasecmp (atom + 1, "thernet"))
|
||||||
@@ -334,9 +339,15 @@ static int intern (atom, dfv)
|
|||||||
return SIADDR;
|
return SIADDR;
|
||||||
if (!strcasecmp (atom + 1, "ubnet"))
|
if (!strcasecmp (atom + 1, "ubnet"))
|
||||||
return SUBNET;
|
return SUBNET;
|
||||||
|
if (!strcasecmp (atom + 1, "hared-network"))
|
||||||
|
return SHARED_NETWORK;
|
||||||
|
if (!strcasecmp (atom + 1, "erver-name"))
|
||||||
|
return SERVER_NAME;
|
||||||
|
if (!strcasecmp (atom + 1, "erver-identifier"))
|
||||||
|
return SERVER_IDENTIFIER;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
if (!strcasecmp (atom + 1, "timestamp"))
|
if (!strcasecmp (atom + 1, "imestamp"))
|
||||||
return TIMESTAMP;
|
return TIMESTAMP;
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
|
Reference in New Issue
Block a user