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
c5379c1a
Commit
c5379c1a
authored
Feb 24, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't send hoplimit 1 when multicasting RAs
parent
a4a5205f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
src/radv.c
src/radv.c
+4
-6
No files found.
src/radv.c
View file @
c5379c1a
...
...
@@ -41,7 +41,7 @@ static int iface_search(struct in6_addr *local, int prefix,
int
scope
,
int
if_index
,
int
dad
,
void
*
vparam
);
static
int
add_lla
(
int
index
,
unsigned
int
type
,
char
*
mac
,
size_t
maclen
,
void
*
parm
);
static
int
unicast_hop_limit
,
multicast_
hop_limit
;
static
int
hop_limit
;
static
time_t
ra_short_period_start
;
void
ra_init
(
time_t
now
)
...
...
@@ -53,16 +53,14 @@ void ra_init(time_t now)
int
class
=
IPTOS_CLASS_CS6
;
#endif
int
val
=
255
;
/* radvd uses this value */
size_t
len1
=
sizeof
(
int
);
size_t
len2
=
sizeof
(
int
);
size_t
len
=
sizeof
(
int
);
ICMP6_FILTER_SETBLOCKALL
(
&
filter
);
ICMP6_FILTER_SETPASS
(
ND_ROUTER_SOLICIT
,
&
filter
);
ICMP6_FILTER_SETPASS
(
ND_ROUTER_ADVERT
,
&
filter
);
if
((
fd
=
socket
(
PF_INET6
,
SOCK_RAW
,
IPPROTO_ICMPV6
))
==
-
1
||
getsockopt
(
fd
,
IPPROTO_IPV6
,
IPV6_UNICAST_HOPS
,
&
unicast_hop_limit
,
&
len1
)
||
getsockopt
(
fd
,
IPPROTO_IPV6
,
IPV6_MULTICAST_HOPS
,
&
multicast_hop_limit
,
&
len2
)
||
getsockopt
(
fd
,
IPPROTO_IPV6
,
IPV6_UNICAST_HOPS
,
&
hop_limit
,
&
len
)
||
#if defined(IP_TOS) && defined(IPTOS_CLASS_CS6)
setsockopt
(
fd
,
IPPROTO_IPV6
,
IPV6_TCLASS
,
&
class
,
sizeof
(
class
))
==
-
1
||
#endif
...
...
@@ -198,7 +196,7 @@ static void send_ra(int iface, char *iface_name, struct in6_addr *dest)
ra
->
type
=
ICMP6_ROUTER_ADVERT
;
ra
->
code
=
0
;
ra
->
hop_limit
=
dest
?
unicast_hop_limit
:
multicast_
hop_limit
;
ra
->
hop_limit
=
hop_limit
;
ra
->
flags
=
0
;
ra
->
lifetime
=
htons
(
1800
);
/* AdvDefaultLifetime*/
ra
->
reachable_time
=
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