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
861c8914
Commit
861c8914
authored
Sep 25, 2013
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change rules for constructing DHCPv6 ranges.
parent
8939c95f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
CHANGELOG
CHANGELOG
+5
-0
man/dnsmasq.8
man/dnsmasq.8
+3
-7
src/dhcp6.c
src/dhcp6.c
+7
-5
No files found.
CHANGELOG
View file @
861c8914
...
@@ -119,6 +119,11 @@ version 2.67
...
@@ -119,6 +119,11 @@ version 2.67
6939 for this to work. It always works for directly
6939 for this to work. It always works for directly
connected clients. Thanks to Vladislav Grishenko
connected clients. Thanks to Vladislav Grishenko
for prompting this feature.
for prompting this feature.
Remove the rule for constructed DHCP ranges that the local
address must be either the first or last address in the
range. This was originally to avoid SLAAC addresses, but
we now explicitly autoconfig and privacy addresses instead.
version 2.66
version 2.66
...
...
man/dnsmasq.8
View file @
861c8914
...
@@ -652,24 +652,20 @@ This forms a template which describes how to create ranges, based on the address
...
@@ -652,24 +652,20 @@ This forms a template which describes how to create ranges, based on the address
.B --dhcp-range=::1,::400,constructor:eth0
.B --dhcp-range=::1,::400,constructor:eth0
will look for addresses o
f the form <network>::1 or <network>:400 o
n
will look for addresses on
eth0 and then create a range from <network>::1 to <network>::400. If
eth0 and then create a range from <network>::1 to <network>::400. If
the interface is assigned more than one network, then the
the interface is assigned more than one network, then the
corresponding ranges will be automatically created, and then
corresponding ranges will be automatically created, and then
deprecated and finally removed again as the address is deprecated and
deprecated and finally removed again as the address is deprecated and
then deleted. The interface name may have a final "*" wildcard. Note
then deleted. The interface name may have a final "*" wildcard. Note
that just any address on eth0 will not do: the non-prefix part must be
that just any address on eth0 will not do: it must not be an
equal either the start or end address given in the dhcp-range. This is
autoconfigured or privacy address, or be deprecated.
to prevent prefixes becoming perpetual if the interface
gains a SLAAC address for the prefix when it is advertised by dnsmasq.
If a dhcp-range is only being used for stateless DHCP and/or SLAAC,
If a dhcp-range is only being used for stateless DHCP and/or SLAAC,
then the address can be simply ::
then the address can be simply ::
.B --dhcp-range=::,constructor:eth0
.B --dhcp-range=::,constructor:eth0
This removes the condition above, and will pick up the prefix from any address on eth0 which is NOT
autoconfigured, slaac, temporary or deprecated.
There is a variant of the constructor: syntax using the keyword
There is a variant of the constructor: syntax using the keyword
.B constructor-noauth.
.B constructor-noauth.
...
...
src/dhcp6.c
View file @
861c8914
...
@@ -602,6 +602,12 @@ static int construct_worker(struct in6_addr *local, int prefix,
...
@@ -602,6 +602,12 @@ static int construct_worker(struct in6_addr *local, int prefix,
IN6_IS_ADDR_MULTICAST
(
local
))
IN6_IS_ADDR_MULTICAST
(
local
))
return
1
;
return
1
;
if
(
!
(
flags
&
IFACE_PERMANENT
))
return
1
;
if
(
flags
&
IFACE_DEPRECATED
)
return
1
;
if
(
!
indextoname
(
daemon
->
doing_dhcp6
?
daemon
->
dhcp6fd
:
daemon
->
icmp6fd
,
if_index
,
ifrn_name
))
if
(
!
indextoname
(
daemon
->
doing_dhcp6
?
daemon
->
dhcp6fd
:
daemon
->
icmp6fd
,
if_index
,
ifrn_name
))
return
0
;
return
0
;
...
@@ -618,11 +624,7 @@ static int construct_worker(struct in6_addr *local, int prefix,
...
@@ -618,11 +624,7 @@ static int construct_worker(struct in6_addr *local, int prefix,
}
}
}
}
else
if
((
addr6part
(
local
)
==
addr6part
(
&
template
->
start6
)
||
else
if
(
wildcard_match
(
template
->
template_interface
,
ifrn_name
))
addr6part
(
local
)
==
addr6part
(
&
template
->
end6
)
||
(
IN6_IS_ADDR_UNSPECIFIED
(
&
template
->
start6
)
&&
IFACE_PERMANENT
==
(
flags
&
(
IFACE_PERMANENT
|
IFACE_DEPRECATED
))))
&&
wildcard_match
(
template
->
template_interface
,
ifrn_name
))
{
{
start6
=
*
local
;
start6
=
*
local
;
setaddr6part
(
&
start6
,
addr6part
(
&
template
->
start6
));
setaddr6part
(
&
start6
,
addr6part
(
&
template
->
start6
));
...
...
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