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
1b75c1e6
Commit
1b75c1e6
authored
Dec 18, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Per-context control over ra short period.
parent
293fd0f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
src/dhcp6.c
src/dhcp6.c
+1
-1
src/dnsmasq.h
src/dnsmasq.h
+1
-1
src/radv.c
src/radv.c
+7
-7
No files found.
src/dhcp6.c
View file @
1b75c1e6
...
@@ -542,7 +542,7 @@ static int construct_worker(struct in6_addr *local, int prefix,
...
@@ -542,7 +542,7 @@ static int construct_worker(struct in6_addr *local, int prefix,
context
->
next
=
daemon
->
dhcp6
;
context
->
next
=
daemon
->
dhcp6
;
daemon
->
dhcp6
=
context
;
daemon
->
dhcp6
=
context
;
ra_start_unsolicted
(
dnsmasq_time
()
,
context
);
ra_start_unsolicted
(
param
->
now
,
context
);
/* we created a new one, need to call
/* we created a new one, need to call
lease_update_file to get periodic functions called */
lease_update_file to get periodic functions called */
param
->
newone
=
1
;
param
->
newone
=
1
;
...
...
src/dnsmasq.h
View file @
1b75c1e6
...
@@ -678,7 +678,7 @@ struct dhcp_context {
...
@@ -678,7 +678,7 @@ struct dhcp_context {
struct
in6_addr
start6
,
end6
;
/* range of available addresses */
struct
in6_addr
start6
,
end6
;
/* range of available addresses */
struct
in6_addr
local6
;
struct
in6_addr
local6
;
int
prefix
,
if_index
;
int
prefix
,
if_index
;
time_t
ra_time
;
time_t
ra_time
,
ra_short_period_start
;
char
*
template_interface
;
char
*
template_interface
;
int
valid
,
preferred
;
/* times from address for constructed contexts */
int
valid
,
preferred
;
/* times from address for constructed contexts */
#endif
#endif
...
...
src/radv.c
View file @
1b75c1e6
...
@@ -48,7 +48,6 @@ static int iface_search(struct in6_addr *local, int prefix,
...
@@ -48,7 +48,6 @@ static int iface_search(struct in6_addr *local, int prefix,
static
int
add_lla
(
int
index
,
unsigned
int
type
,
char
*
mac
,
size_t
maclen
,
void
*
parm
);
static
int
add_lla
(
int
index
,
unsigned
int
type
,
char
*
mac
,
size_t
maclen
,
void
*
parm
);
static
int
hop_limit
;
static
int
hop_limit
;
static
time_t
ra_short_period_start
;
void
ra_init
(
time_t
now
)
void
ra_init
(
time_t
now
)
{
{
...
@@ -99,14 +98,15 @@ void ra_start_unsolicted(time_t now, struct dhcp_context *context)
...
@@ -99,14 +98,15 @@ void ra_start_unsolicted(time_t now, struct dhcp_context *context)
and pick up new interfaces */
and pick up new interfaces */
if
(
context
)
if
(
context
)
context
->
ra_time
=
now
;
context
->
ra_
short_period_start
=
context
->
ra_
time
=
now
;
else
else
for
(
context
=
daemon
->
dhcp6
;
context
;
context
=
context
->
next
)
for
(
context
=
daemon
->
dhcp6
;
context
;
context
=
context
->
next
)
if
(
!
(
context
->
flags
&
CONTEXT_TEMPLATE
))
if
(
!
(
context
->
flags
&
CONTEXT_TEMPLATE
))
context
->
ra_time
=
now
+
(
rand16
()
/
13000
);
/* range 0 - 5 */
{
context
->
ra_time
=
now
+
(
rand16
()
/
13000
);
/* range 0 - 5 */
/* re-do frequently for a minute or so, in case the first gets lost. */
/* re-do frequently for a minute or so, in case the first gets lost. */
ra_short_period_start
=
now
;
context
->
ra_short_period_start
=
now
;
}
}
}
void
icmp6_packet
(
time_t
now
)
void
icmp6_packet
(
time_t
now
)
...
@@ -552,7 +552,7 @@ static int iface_search(struct in6_addr *local, int prefix,
...
@@ -552,7 +552,7 @@ static int iface_search(struct in6_addr *local, int prefix,
if
(
!
dad
)
if
(
!
dad
)
param
->
iface
=
if_index
;
param
->
iface
=
if_index
;
if
(
difftime
(
param
->
now
,
ra_short_period_start
)
<
60
.
0
)
if
(
difftime
(
param
->
now
,
context
->
ra_short_period_start
)
<
60
.
0
)
/* range 5 - 20 */
/* range 5 - 20 */
context
->
ra_time
=
param
->
now
+
5
+
(
rand16
()
/
4400
);
context
->
ra_time
=
param
->
now
+
5
+
(
rand16
()
/
4400
);
else
else
...
...
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