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
3b43646a
Commit
3b43646a
authored
Dec 28, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use /proc/sys/net/ipv6/conf/<iface>/mtu for RA advertised MTU.
parent
3bc0d932
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
src/radv.c
src/radv.c
+19
-7
No files found.
src/radv.c
View file @
3b43646a
...
...
@@ -193,7 +193,10 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
struct
dhcp_netid
iface_id
;
struct
dhcp_opt
*
opt_cfg
;
int
done_dns
=
0
;
#ifdef HAVE_LINUX_NETWORK
FILE
*
f
;
#endif
save_counter
(
0
);
ra
=
expand
(
sizeof
(
struct
ra_packet
));
...
...
@@ -230,14 +233,23 @@ static void send_ra(time_t now, int iface, char *iface_name, struct in6_addr *de
return
;
strncpy
(
ifr
.
ifr_name
,
iface_name
,
IF_NAMESIZE
);
if
(
ioctl
(
daemon
->
icmp6fd
,
SIOCGIFMTU
,
&
ifr
)
!=
-
1
)
#ifdef HAVE_LINUX_NETWORK
/* Note that IPv6 MTU is not necessarilly the same as the IPv4 MTU
available from SIOCGIFMTU */
sprintf
(
daemon
->
namebuff
,
"/proc/sys/net/ipv6/conf/%s/mtu"
,
iface_name
);
if
((
f
=
fopen
(
daemon
->
namebuff
,
"r"
)))
{
put_opt6_char
(
ICMP6_OPT_MTU
);
put_opt6_char
(
1
);
put_opt6_short
(
0
);
put_opt6_long
(
ifr
.
ifr_mtu
);
if
(
fgets
(
daemon
->
namebuff
,
MAXDNAME
,
f
))
{
put_opt6_char
(
ICMP6_OPT_MTU
);
put_opt6_char
(
1
);
put_opt6_short
(
0
);
put_opt6_long
(
atoi
(
daemon
->
namebuff
));
}
fclose
(
f
);
}
#endif
iface_enumerate
(
AF_LOCAL
,
&
iface
,
add_lla
);
...
...
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