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
ef1d7425
Commit
ef1d7425
authored
Oct 03, 2013
by
Tanguy Bouzeloc
Committed by
Simon Kelley
Oct 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix problem in DHCPv6 vendorclass/userclass matching code.
parent
1d1c7956
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
CHANGELOG
CHANGELOG
+3
-0
src/rfc3315.c
src/rfc3315.c
+8
-3
No files found.
CHANGELOG
View file @
ef1d7425
...
@@ -127,6 +127,9 @@ version 2.67
...
@@ -127,6 +127,9 @@ version 2.67
Update Polish translation. Thanks to Jan Psota.
Update Polish translation. Thanks to Jan Psota.
Fix problem in DHCPv6 vendorclass/userclass matching
code. Thanks to Tanguy Bouzeloc for the patch.
version 2.66
version 2.66
Add the ability to act as an authoritative DNS
Add the ability to act as an authoritative DNS
...
...
src/rfc3315.c
View file @
ef1d7425
...
@@ -66,6 +66,10 @@ static void calculate_times(struct dhcp_context *context, unsigned int *min_time
...
@@ -66,6 +66,10 @@ static void calculate_times(struct dhcp_context *context, unsigned int *min_time
#define opt6_type(opt) (opt6_uint(opt, -4, 2))
#define opt6_type(opt) (opt6_uint(opt, -4, 2))
#define opt6_ptr(opt, i) ((void *)&(((unsigned char *)(opt))[4+(i)]))
#define opt6_ptr(opt, i) ((void *)&(((unsigned char *)(opt))[4+(i)]))
#define opt6_user_vendor_ptr(opt, i) ((void *)&(((unsigned char *)(opt))[2+(i)]))
#define opt6_user_vendor_len(opt) ((int)(opt6_uint(opt, -4, 2)))
#define opt6_user_vendor_next(opt, end) (opt6_next(((void *) opt) - 2, end))
unsigned
short
dhcp6_reply
(
struct
dhcp_context
*
context
,
int
interface
,
char
*
iface_name
,
unsigned
short
dhcp6_reply
(
struct
dhcp_context
*
context
,
int
interface
,
char
*
iface_name
,
struct
in6_addr
*
fallback
,
size_t
sz
,
struct
in6_addr
*
client_addr
,
time_t
now
)
struct
in6_addr
*
fallback
,
size_t
sz
,
struct
in6_addr
*
client_addr
,
time_t
now
)
...
@@ -355,9 +359,10 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
...
@@ -355,9 +359,10 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
offset
=
4
;
offset
=
4
;
}
}
for
(
enc_opt
=
opt6_ptr
(
opt
,
offset
);
enc_opt
;
enc_opt
=
opt6_next
(
enc_opt
,
enc_end
))
/* Note that format if user/vendor classes is different to DHCP options - no option types. */
for
(
i
=
0
;
i
<=
(
opt6_len
(
enc_opt
)
-
vendor
->
len
);
i
++
)
for
(
enc_opt
=
opt6_ptr
(
opt
,
offset
);
enc_opt
;
enc_opt
=
opt6_user_vendor_next
(
enc_opt
,
enc_end
))
if
(
memcmp
(
vendor
->
data
,
opt6_ptr
(
enc_opt
,
i
),
vendor
->
len
)
==
0
)
for
(
i
=
0
;
i
<=
(
opt6_user_vendor_len
(
enc_opt
)
-
vendor
->
len
);
i
++
)
if
(
memcmp
(
vendor
->
data
,
opt6_user_vendor_ptr
(
enc_opt
,
i
),
vendor
->
len
)
==
0
)
{
{
vendor
->
netid
.
next
=
state
->
tags
;
vendor
->
netid
.
next
=
state
->
tags
;
state
->
tags
=
&
vendor
->
netid
;
state
->
tags
=
&
vendor
->
netid
;
...
...
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