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
fdc97e13
Commit
fdc97e13
authored
Feb 13, 2016
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid divide-by-zero when dhcp-range is a whole /64
parent
a18bf314
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
CHANGELOG
CHANGELOG
+7
-4
src/dhcp6.c
src/dhcp6.c
+10
-1
No files found.
CHANGELOG
View file @
fdc97e13
...
...
@@ -40,12 +40,15 @@ version 2.76
Extend --add-mac to allow a new encoding of the MAC address
as base64, by configurting --add-mac=base64
Add --add-cpe-id option.
Don't crash with divide-by-zero if an IPv6 dhcp-range
is declared as a whole /64.
(ie xx::0 to xx::ffff:ffff:ffff:ffff)
Thanks to Laurent Bendel for spotting this problem.
version 2.75
Fix reversion on 2.74 which caused 100% CPU use when a
dhcp-script is configured. Thanks to Adrian Davey for
...
...
src/dhcp6.c
View file @
fdc97e13
...
...
@@ -434,7 +434,16 @@ struct dhcp_context *address6_allocate(struct dhcp_context *context, unsigned c
/* seed is largest extant lease addr in this context */
start
=
lease_find_max_addr6
(
c
)
+
serial
;
else
start
=
addr6part
(
&
c
->
start6
)
+
((
j
+
c
->
addr_epoch
)
%
(
1
+
addr6part
(
&
c
->
end6
)
-
addr6part
(
&
c
->
start6
)));
{
u64
range
=
1
+
addr6part
(
&
c
->
end6
)
-
addr6part
(
&
c
->
start6
);
u64
offset
=
j
+
c
->
addr_epoch
;
/* don't divide by zero if range is whole 2^64 */
if
(
range
!=
0
)
offset
=
offset
%
range
;
start
=
addr6part
(
&
c
->
start6
)
+
offset
;
}
/* iterate until we find a free address. */
addr
=
start
;
...
...
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