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
24b5a5d5
Commit
24b5a5d5
authored
Oct 11, 2013
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dhcp-host selection fix for v4/v6
parent
d56a604a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
25 deletions
+29
-25
CHANGELOG
CHANGELOG
+5
-0
src/dhcp-common.c
src/dhcp-common.c
+17
-18
src/rfc1035.c
src/rfc1035.c
+7
-7
No files found.
CHANGELOG
View file @
24b5a5d5
...
...
@@ -144,6 +144,11 @@ version 2.67
target of --cname. Thanks to Hadmut Danisch for the
suggestion.
Avoid treating a --dhcp-host which has an IPv6 address
as eligable for use with DHCPv4 on the grounds that it has
no address, and vice-versa. Thanks to Yury Konovalov for
spotting the problem.
version 2.66
Add the ability to act as an authoritative DNS
...
...
src/dhcp-common.c
View file @
24b5a5d5
...
...
@@ -272,27 +272,26 @@ static int is_config_in_context(struct dhcp_context *context, struct dhcp_config
if
(
!
context
)
/* called via find_config() from lease_update_from_configs() */
return
1
;
if
(
!
(
context
->
flags
&
CONTEXT_V6
))
{
if
(
!
(
config
->
flags
&
CONFIG_ADDR
))
return
1
;
if
(
!
(
config
->
flags
&
(
CONFIG_ADDR
|
CONFIG_ADDR6
)))
return
1
;
#ifdef HAVE_DHCP6
if
((
context
->
flags
&
CONTEXT_V6
)
&&
(
config
->
flags
&
CONFIG_WILDCARD
))
return
1
;
#endif
for
(;
context
;
context
=
context
->
current
)
if
(
is_same_net
(
config
->
addr
,
context
->
start
,
context
->
netmask
))
return
1
;
}
for
(;
context
;
context
=
context
->
current
)
#ifdef HAVE_DHCP6
else
{
if
(
!
(
config
->
flags
&
CONFIG_ADDR6
)
||
(
config
->
flags
&
CONFIG_WILDCARD
))
return
1
;
for
(;
context
;
context
=
context
->
current
)
if
(
is_same_net6
(
&
config
->
addr6
,
&
context
->
start6
,
context
->
prefix
))
return
1
;
}
if
(
context
->
flags
&
CONTEXT_V6
)
{
if
((
config
->
flags
&
CONFIG_ADDR6
)
&&
is_same_net6
(
&
config
->
addr6
,
&
context
->
start6
,
context
->
prefix
))
return
1
;
}
else
#endif
if
((
config
->
flags
&
CONFIG_ADDR
)
&&
is_same_net
(
config
->
addr
,
context
->
start
,
context
->
netmask
))
return
1
;
return
0
;
}
...
...
src/rfc1035.c
View file @
24b5a5d5
...
...
@@ -644,20 +644,20 @@ size_t calc_subnet_opt(struct subnet_opt *opt, union mysockaddr *source)
int
len
;
void
*
addrp
;
if
(
source
->
sa
.
sa_family
==
AF_INET
)
{
opt
->
family
=
htons
(
1
);
opt
->
source_netmask
=
daemon
->
addr4_netmask
;
addrp
=
&
source
->
in
.
sin_addr
;
}
#ifdef HAVE_IPV6
else
if
(
source
->
sa
.
sa_family
==
AF_INET6
)
{
opt
->
family
=
htons
(
2
);
opt
->
source_netmask
=
daemon
->
addr6_netmask
;
addrp
=
&
source
->
in6
.
sin6_addr
;
}
else
#endif
{
opt
->
family
=
htons
(
1
);
opt
->
source_netmask
=
daemon
->
addr4_netmask
;
addrp
=
&
source
->
in
.
sin_addr
;
}
opt
->
scope_netmask
=
0
;
len
=
0
;
...
...
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