Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
nanahira
Dnsmasq
Commits
c7961075
Commit
c7961075
authored
Feb 28, 2013
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't erroneously reject some option names in --dhcp-match
parent
ab6ede7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
CHANGELOG
CHANGELOG
+3
-0
src/dhcp-common.c
src/dhcp-common.c
+4
-10
src/option.c
src/option.c
+4
-0
No files found.
CHANGELOG
View file @
c7961075
...
@@ -46,6 +46,9 @@ version 2.66
...
@@ -46,6 +46,9 @@ version 2.66
Add --ipset option. Thanks to Jason A. Donenfeld for the
Add --ipset option. Thanks to Jason A. Donenfeld for the
patch.
patch.
Don't erroneously reject some option names in --dhcp-match
options. Thnaks to Benedikt Hochstrasser for the bug report.
version 2.65
version 2.65
Fix regression which broke forwarding of queries sent via
Fix regression which broke forwarding of queries sent via
...
...
src/dhcp-common.c
View file @
c7961075
...
@@ -518,8 +518,7 @@ u16 lookup_dhcp_opt(int prot, char *name)
...
@@ -518,8 +518,7 @@ u16 lookup_dhcp_opt(int prot, char *name)
t
=
opttab
;
t
=
opttab
;
for
(
i
=
0
;
t
[
i
].
name
;
i
++
)
for
(
i
=
0
;
t
[
i
].
name
;
i
++
)
if
(
!
(
t
[
i
].
size
&
OT_INTERNAL
)
&&
if
(
strcasecmp
(
t
[
i
].
name
,
name
)
==
0
)
strcasecmp
(
t
[
i
].
name
,
name
)
==
0
)
return
t
[
i
].
val
;
return
t
[
i
].
val
;
return
0
;
return
0
;
...
@@ -539,14 +538,9 @@ u16 lookup_dhcp_len(int prot, u16 val)
...
@@ -539,14 +538,9 @@ u16 lookup_dhcp_len(int prot, u16 val)
for
(
i
=
0
;
t
[
i
].
name
;
i
++
)
for
(
i
=
0
;
t
[
i
].
name
;
i
++
)
if
(
val
==
t
[
i
].
val
)
if
(
val
==
t
[
i
].
val
)
{
return
t
[
i
].
size
&
~
OT_DEC
;
if
(
t
[
i
].
size
&
OT_INTERNAL
)
return
0
;
return
0
;
return
t
[
i
].
size
&
~
OT_DEC
;
}
return
0
;
}
}
char
*
option_string
(
int
prot
,
unsigned
int
opt
,
unsigned
char
*
val
,
int
opt_len
,
char
*
buf
,
int
buf_len
)
char
*
option_string
(
int
prot
,
unsigned
int
opt
,
unsigned
char
*
val
,
int
opt_len
,
char
*
buf
,
int
buf_len
)
...
...
src/option.c
View file @
c7961075
...
@@ -768,6 +768,8 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
...
@@ -768,6 +768,8 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
new
->
opt
=
lookup_dhcp_opt
(
AF_INET
,
arg
+
7
);
new
->
opt
=
lookup_dhcp_opt
(
AF_INET
,
arg
+
7
);
opt_len
=
lookup_dhcp_len
(
AF_INET
,
new
->
opt
);
opt_len
=
lookup_dhcp_len
(
AF_INET
,
new
->
opt
);
/* option:<optname> must follow tag and vendor string. */
/* option:<optname> must follow tag and vendor string. */
if
((
opt_len
&
OT_INTERNAL
)
&&
flags
!=
DHOPT_MATCH
)
new
->
opt
=
0
;
break
;
break
;
}
}
#ifdef HAVE_DHCP6
#ifdef HAVE_DHCP6
...
@@ -786,6 +788,8 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
...
@@ -786,6 +788,8 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
{
{
new
->
opt
=
lookup_dhcp_opt
(
AF_INET6
,
arg
+
8
);
new
->
opt
=
lookup_dhcp_opt
(
AF_INET6
,
arg
+
8
);
opt_len
=
lookup_dhcp_len
(
AF_INET6
,
new
->
opt
);
opt_len
=
lookup_dhcp_len
(
AF_INET6
,
new
->
opt
);
if
((
opt_len
&
OT_INTERNAL
)
&&
flags
!=
DHOPT_MATCH
)
new
->
opt
=
0
;
}
}
/* option6:<opt>|<optname> must follow tag and vendor string. */
/* option6:<opt>|<optname> must follow tag and vendor string. */
is6
=
1
;
is6
=
1
;
...
...
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