Revert "ipv4: shrink netns_ipv4 with sysctl conversions"

This reverts commit f662a0786d which is
commit 4b6bbf17d4e1939afa72821879fc033d725e9491 upstream.

It breaks the Android kernel abi, and is not needed at this point in
time.  If it is required, it can come back in an ABI-safe way.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I762a8a7eaee1baa7dbedc9c72854b85cfffbe7d9
This commit is contained in:
Greg Kroah-Hartman 2023-04-28 14:29:22 +00:00
parent e2f3aab65b
commit a4023d8fc3
2 changed files with 48 additions and 48 deletions

View File

@ -85,36 +85,36 @@ struct netns_ipv4 {
struct xt_table *nat_table;
#endif
u8 sysctl_icmp_echo_ignore_all;
u8 sysctl_icmp_echo_ignore_broadcasts;
u8 sysctl_icmp_ignore_bogus_error_responses;
u8 sysctl_icmp_errors_use_inbound_ifaddr;
int sysctl_icmp_echo_ignore_all;
int sysctl_icmp_echo_ignore_broadcasts;
int sysctl_icmp_ignore_bogus_error_responses;
int sysctl_icmp_ratelimit;
int sysctl_icmp_ratemask;
int sysctl_icmp_errors_use_inbound_ifaddr;
struct local_ports ip_local_ports;
u8 sysctl_tcp_ecn;
u8 sysctl_tcp_ecn_fallback;
int sysctl_tcp_ecn;
int sysctl_tcp_ecn_fallback;
u8 sysctl_ip_default_ttl;
u8 sysctl_ip_no_pmtu_disc;
u8 sysctl_ip_fwd_use_pmtu;
int sysctl_ip_default_ttl;
int sysctl_ip_no_pmtu_disc;
int sysctl_ip_fwd_use_pmtu;
int sysctl_ip_fwd_update_priority;
u8 sysctl_ip_nonlocal_bind;
u8 sysctl_ip_autobind_reuse;
int sysctl_ip_nonlocal_bind;
int sysctl_ip_autobind_reuse;
/* Shall we try to damage output packets if routing dev changes? */
u8 sysctl_ip_dynaddr;
u8 sysctl_ip_early_demux;
int sysctl_ip_dynaddr;
int sysctl_ip_early_demux;
#ifdef CONFIG_NET_L3_MASTER_DEV
u8 sysctl_raw_l3mdev_accept;
int sysctl_raw_l3mdev_accept;
#endif
int sysctl_tcp_early_demux;
int sysctl_udp_early_demux;
u8 sysctl_nexthop_compat_mode;
int sysctl_nexthop_compat_mode;
u8 sysctl_fwmark_reflect;
int sysctl_fwmark_reflect;
int sysctl_tcp_fwmark_accept;
#ifdef CONFIG_NET_L3_MASTER_DEV
int sysctl_tcp_l3mdev_accept;

View File

@ -540,30 +540,30 @@ static struct ctl_table ipv4_net_table[] = {
{
.procname = "icmp_echo_ignore_all",
.data = &init_net.ipv4.sysctl_icmp_echo_ignore_all,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "icmp_echo_ignore_broadcasts",
.data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "icmp_ignore_bogus_error_responses",
.data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "icmp_errors_use_inbound_ifaddr",
.data = &init_net.ipv4.sysctl_icmp_errors_use_inbound_ifaddr,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "icmp_ratelimit",
@ -590,9 +590,9 @@ static struct ctl_table ipv4_net_table[] = {
{
.procname = "raw_l3mdev_accept",
.data = &init_net.ipv4.sysctl_raw_l3mdev_accept,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
@ -600,30 +600,30 @@ static struct ctl_table ipv4_net_table[] = {
{
.procname = "tcp_ecn",
.data = &init_net.ipv4.sysctl_tcp_ecn,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "tcp_ecn_fallback",
.data = &init_net.ipv4.sysctl_tcp_ecn_fallback,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "ip_dynaddr",
.data = &init_net.ipv4.sysctl_ip_dynaddr,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "ip_early_demux",
.data = &init_net.ipv4.sysctl_ip_early_demux,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "udp_early_demux",
@ -642,18 +642,18 @@ static struct ctl_table ipv4_net_table[] = {
{
.procname = "nexthop_compat_mode",
.data = &init_net.ipv4.sysctl_nexthop_compat_mode,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
{
.procname = "ip_default_ttl",
.data = &init_net.ipv4.sysctl_ip_default_ttl,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec_minmax,
.extra1 = &ip_ttl_min,
.extra2 = &ip_ttl_max,
},
@ -681,16 +681,16 @@ static struct ctl_table ipv4_net_table[] = {
{
.procname = "ip_no_pmtu_disc",
.data = &init_net.ipv4.sysctl_ip_no_pmtu_disc,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "ip_forward_use_pmtu",
.data = &init_net.ipv4.sysctl_ip_fwd_use_pmtu,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec,
},
{
.procname = "ip_forward_update_priority",
@ -704,25 +704,25 @@ static struct ctl_table ipv4_net_table[] = {
{
.procname = "ip_nonlocal_bind",
.data = &init_net.ipv4.sysctl_ip_nonlocal_bind,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec
},
{
.procname = "ip_autobind_reuse",
.data = &init_net.ipv4.sysctl_ip_autobind_reuse,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
{
.procname = "fwmark_reflect",
.data = &init_net.ipv4.sysctl_fwmark_reflect,
.maxlen = sizeof(u8),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dou8vec_minmax,
.proc_handler = proc_dointvec,
},
{
.procname = "tcp_fwmark_accept",