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
44522920
Commit
44522920
authored
Nov 15, 2013
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When advertising ONLY deleted IPv6 prefixes, set router lifetime to zero.
parent
dd9d9ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
src/radv.c
src/radv.c
+10
-5
No files found.
src/radv.c
View file @
44522920
...
@@ -205,7 +205,7 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
...
@@ -205,7 +205,7 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
struct
dhcp_netid
iface_id
;
struct
dhcp_netid
iface_id
;
struct
dhcp_opt
*
opt_cfg
;
struct
dhcp_opt
*
opt_cfg
;
struct
ra_interface
*
ra_param
=
find_iface_param
(
iface_name
);
struct
ra_interface
*
ra_param
=
find_iface_param
(
iface_name
);
int
done_dns
=
0
;
int
done_dns
=
0
,
old_prefix
=
0
;
#ifdef HAVE_LINUX_NETWORK
#ifdef HAVE_LINUX_NETWORK
FILE
*
f
;
FILE
*
f
;
#endif
#endif
...
@@ -267,7 +267,7 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
...
@@ -267,7 +267,7 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
struct
in6_addr
local
=
context
->
start6
;
struct
in6_addr
local
=
context
->
start6
;
int
do_slaac
=
0
;
int
do_slaac
=
0
;
parm
.
found_context
=
1
;
old_prefix
=
1
;
/* zero net part of address */
/* zero net part of address */
setaddr6part
(
&
local
,
addr6part
(
&
local
)
&
~
((
context
->
prefix
==
64
)
?
(
u64
)
-
1LL
:
(
1LLU
<<
(
128
-
context
->
prefix
))
-
1LLU
));
setaddr6part
(
&
local
,
addr6part
(
&
local
)
&
~
((
context
->
prefix
==
64
)
?
(
u64
)
-
1LL
:
(
1LLU
<<
(
128
-
context
->
prefix
))
-
1LLU
));
...
@@ -300,9 +300,14 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
...
@@ -300,9 +300,14 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
up
=
&
context
->
next
;
up
=
&
context
->
next
;
}
}
if
(
!
parm
.
found_context
)
/* If we're advertising only old prefixes, set router lifetime to zero. */
return
;
if
(
old_prefix
&&
!
parm
.
found_context
)
ra
->
lifetime
=
htons
(
0
);
/* No prefixes to advertise. */
if
(
!
old_prefix
&&
!
parm
.
found_context
)
return
;
#ifdef HAVE_LINUX_NETWORK
#ifdef HAVE_LINUX_NETWORK
/* Note that IPv6 MTU is not necessarilly the same as the IPv4 MTU
/* Note that IPv6 MTU is not necessarilly the same as the IPv4 MTU
available from SIOCGIFMTU */
available from SIOCGIFMTU */
...
...
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