Skip to content

Commit ec35b61

Browse files
fxlbdavem330
authored andcommitted
IPv6: move the anycast_src_echo_reply sysctl to netns_sysctl_ipv6
This change move anycast_src_echo_reply sysctl with other ipv6 sysctls. Suggested-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: Francois-Xavier Le Bail <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0e864b2 commit ec35b61

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/net/netns/ipv6.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct netns_sysctl_ipv6 {
2828
int ip6_rt_mtu_expires;
2929
int ip6_rt_min_advmss;
3030
int icmpv6_time;
31+
int anycast_src_echo_reply;
3132
};
3233

3334
struct netns_ipv6 {
@@ -73,7 +74,6 @@ struct netns_ipv6 {
7374
#endif
7475
atomic_t dev_addr_genid;
7576
atomic_t rt_genid;
76-
int anycast_src_echo_reply;
7777
};
7878

7979
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)

net/ipv6/icmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
559559
saddr = &ipv6_hdr(skb)->daddr;
560560

561561
if (!ipv6_unicast_destination(skb) &&
562-
!(net->ipv6.anycast_src_echo_reply &&
562+
!(net->ipv6.sysctl.anycast_src_echo_reply &&
563563
ipv6_anycast_destination(skb)))
564564
saddr = NULL;
565565

net/ipv6/sysctl_net_ipv6.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static struct ctl_table ipv6_table_template[] = {
2626
},
2727
{
2828
.procname = "anycast_src_echo_reply",
29-
.data = &init_net.ipv6.anycast_src_echo_reply,
29+
.data = &init_net.ipv6.sysctl.anycast_src_echo_reply,
3030
.maxlen = sizeof(int),
3131
.mode = 0644,
3232
.proc_handler = proc_dointvec
@@ -58,7 +58,7 @@ static int __net_init ipv6_sysctl_net_init(struct net *net)
5858
if (!ipv6_table)
5959
goto out;
6060
ipv6_table[0].data = &net->ipv6.sysctl.bindv6only;
61-
ipv6_table[1].data = &net->ipv6.anycast_src_echo_reply;
61+
ipv6_table[1].data = &net->ipv6.sysctl.anycast_src_echo_reply;
6262

6363
ipv6_route_table = ipv6_route_sysctl_init(net);
6464
if (!ipv6_route_table)

0 commit comments

Comments
 (0)