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
71
Issues
71
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
c54db708
Commit
c54db708
authored
Dec 03, 2007
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dhcp6.status-code success parsing
parent
6f76de58
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
RELNOTES
RELNOTES
+3
-0
common/parse.c
common/parse.c
+14
-5
common/tables.c
common/tables.c
+1
-1
includes/dhcpd.h
includes/dhcpd.h
+1
-0
No files found.
RELNOTES
View file @
c54db708
...
...
@@ -82,6 +82,9 @@ suggested fixes to <dhcp-users@isc.org>.
-
A
bug
was
fixed
in
the
dhclient
-
script
for
BSDs
to
correctly
carry
error
codes
through
some
conditions
.
-
The
parsing
of
some
options
in
the
dhclient
lease
file
,
in
particular
the
success
DHCPv6
status
-
code
,
was
fixed
.
Changes
since
4.0.0
b2
-
Clarified
error
message
when
lease
limit
exceeded
...
...
common/parse.c
View file @
c54db708
...
...
@@ -59,6 +59,7 @@ struct enumeration *find_enumeration (const char *name, int length)
struct
enumeration_value
*
find_enumeration_value
(
const
char
*
name
,
int
length
,
unsigned
*
widthp
,
const
char
*
value
)
{
struct
enumeration
*
e
;
...
...
@@ -66,6 +67,8 @@ struct enumeration_value *find_enumeration_value (const char *name,
e
=
find_enumeration
(
name
,
length
);
if
(
e
)
{
if
(
widthp
!=
NULL
)
*
widthp
=
e
->
width
;
for
(
i
=
0
;
e
->
values
[
i
].
name
;
i
++
)
{
if
(
!
strcmp
(
value
,
e
->
values
[
i
].
name
))
return
&
e
->
values
[
i
];
...
...
@@ -5103,12 +5106,12 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
"identifier expected"
);
goto
foo
;
}
e
=
find_enumeration_value
(
f
,
(
*
fmt
)
-
f
,
val
);
e
=
find_enumeration_value
(
f
,
(
*
fmt
)
-
f
,
&
len
,
val
);
if
(
!
e
)
{
parse_warn
(
cfile
,
"unknown value"
);
goto
foo
;
}
if
(
!
make_const_data
(
&
t
,
&
e
->
value
,
1
,
0
,
1
,
MDL
))
if
(
!
make_const_data
(
&
t
,
&
e
->
value
,
len
,
0
,
1
,
MDL
))
return
0
;
break
;
...
...
@@ -5284,6 +5287,12 @@ int parse_option_decl (oc, cfile)
break
;
case
't'
:
/* Text string... */
token
=
peek_token
(
&
val
,
&
len
,
cfile
);
if
(
token
==
SEMI
&&
fmt
[
1
]
==
'o'
)
{
fmt
++
;
break
;
}
token
=
next_token
(
&
val
,
&
len
,
cfile
);
if
(
token
!=
STRING
)
{
...
...
@@ -5335,7 +5344,7 @@ int parse_option_decl (oc, cfile)
break
;
case
'N'
:
f
=
fmt
;
f
=
fmt
+
1
;
fmt
=
strchr
(
fmt
,
'.'
);
if
(
!
fmt
)
{
parse_warn
(
cfile
,
...
...
@@ -5350,13 +5359,13 @@ int parse_option_decl (oc, cfile)
"identifier expected"
);
goto
parse_exit
;
}
e
=
find_enumeration_value
(
f
,
fmt
-
f
,
val
);
e
=
find_enumeration_value
(
f
,
fmt
-
f
,
&
len
,
val
);
if
(
!
e
)
{
parse_warn
(
cfile
,
"unknown value"
);
goto
parse_exit
;
}
len
=
1
;
dp
=
&
e
->
value
;
goto
alloc
;
...
...
common/tables.c
View file @
c54db708
...
...
@@ -335,7 +335,7 @@ static struct option dhcpv6_options[] = {
&dhcpv6_universe, 11, 1 },
#endif
{
"unicast"
,
"6"
,
&
dhcpv6_universe
,
12
,
1
},
{
"status-code"
,
"Nstatus-codes.t"
,
&
dhcpv6_universe
,
13
,
1
},
{
"status-code"
,
"Nstatus-codes.t
o
"
,
&
dhcpv6_universe
,
13
,
1
},
{
"rapid-commit"
,
""
,
&
dhcpv6_universe
,
14
,
1
},
#if 0
/* XXX: user-class contents are of the form "StA" where the
...
...
includes/dhcpd.h
View file @
c54db708
...
...
@@ -1681,6 +1681,7 @@ int ddns_removals(struct lease *, struct iaaddr *);
void
add_enumeration
(
struct
enumeration
*
);
struct
enumeration
*
find_enumeration
(
const
char
*
,
int
);
struct
enumeration_value
*
find_enumeration_value
(
const
char
*
,
int
,
unsigned
*
,
const
char
*
);
void
skip_to_semi
PROTO
((
struct
parse
*
));
void
skip_to_rbrace
PROTO
((
struct
parse
*
,
int
));
...
...
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