Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dhcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
69
Issues
69
List
Boards
Labels
Service Desk
Milestones
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
dhcp
Commits
be1ee858
Commit
be1ee858
authored
Sep 08, 1999
by
Ted Lemon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support 'never' as a possible lease expiry time.
parent
4fe74d72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
common/conflex.c
common/conflex.c
+5
-1
common/parse.c
common/parse.c
+9
-2
includes/dhctoken.h
includes/dhctoken.h
+2
-0
No files found.
common/conflex.c
View file @
be1ee858
...
...
@@ -22,7 +22,7 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: conflex.c,v 1.5
2 1999/08/01 14:26:48
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: conflex.c,v 1.5
3 1999/09/08 01:45:34
mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -495,6 +495,8 @@ static enum dhcp_token intern (atom, dfv)
case
'i'
:
if
(
!
strcasecmp
(
atom
+
1
,
"nteger"
))
return
INTEGER
;
if
(
!
strcasecmp
(
atom
+
1
,
"nfinite"
))
return
INFINITE
;
if
(
!
strcasecmp
(
atom
+
1
,
"p-address"
))
return
IP_ADDRESS
;
if
(
!
strcasecmp
(
atom
+
1
,
"nitial-interval"
))
...
...
@@ -557,6 +559,8 @@ static enum dhcp_token intern (atom, dfv)
return
NAMESERVER
;
if
(
!
strcasecmp
(
atom
+
1
,
"etmask"
))
return
NETMASK
;
if
(
!
strcasecmp
(
atom
+
1
,
"ever"
))
return
NEVER
;
if
(
!
strcasecmp
(
atom
+
1
,
"ext-server"
))
return
NEXT_SERVER
;
if
(
!
strcasecmp
(
atom
+
1
,
"ot"
))
...
...
common/parse.c
View file @
be1ee858
...
...
@@ -22,7 +22,7 @@
#ifndef lint
static
char
copyright
[]
=
"$Id: parse.c,v 1.3
6 1999/08/01 14:26:4
9 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
"$Id: parse.c,v 1.3
7 1999/09/08 01:45:2
9 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.
\n
"
;
#endif
/* not lint */
#include "dhcpd.h"
...
...
@@ -536,6 +536,7 @@ void convert_num (buf, str, base, size)
* NUMBER COLON NUMBER COLON NUMBER SEMI |
* NUMBER NUMBER SLASH NUMBER SLASH NUMBER
* NUMBER COLON NUMBER COLON NUMBER NUMBER SEMI |
* NEVER
*
* Dates are stored in GMT or with a timezone offset; first number is day
* of week; next is year/month/day; next is hours:minutes:seconds on a
...
...
@@ -554,8 +555,14 @@ TIME parse_date (cfile)
static
int
months
[
11
]
=
{
31
,
59
,
90
,
120
,
151
,
181
,
212
,
243
,
273
,
304
,
334
};
/* Day of week... */
/* Day of week
, or "never"
... */
token
=
next_token
(
&
val
,
cfile
);
if
(
token
==
NEVER
)
{
if
(
!
parse_semi
(
cfile
))
return
0
;
return
MAX_TIME
;
}
if
(
token
!=
NUMBER
)
{
parse_warn
(
"numeric day of week expected."
);
if
(
token
!=
SEMI
)
...
...
includes/dhctoken.h
View file @
be1ee858
...
...
@@ -194,6 +194,8 @@ enum dhcp_token {
DNS_UPDATE
=
412
,
LEASE_TIME
=
413
,
STATIC
=
414
,
NEVER
=
415
,
INFINITE
=
416
,
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment