mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
net ipv4: Convert ipv4.ip_local_port_range to be per netns v3
- Move sysctl_local_ports from a global variable into struct netns_ipv4. - Modify inet_get_local_port_range to take a struct net, and update all of the callers. - Move the initialization of sysctl_local_ports into sysctl_net_ipv4.c:ipv4_sysctl_init_net from inet_connection_sock.c v2: - Ensure indentation used tabs - Fixed ip.h so it applies cleanly to todays net-next v3: - Compile fixes of strange callers of inet_get_local_port_range. This patch now successfully passes an allmodconfig build. Removed manual inlining of inet_get_local_port_range in ipv4_local_port_range Originally-by: Samya <samya@twitter.com> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
56d7b53f47
commit
0bbf87d852
12 changed files with 56 additions and 46 deletions
|
@ -15,6 +15,10 @@ struct fib_rules_ops;
|
|||
struct hlist_head;
|
||||
struct fib_table;
|
||||
struct sock;
|
||||
struct local_ports {
|
||||
seqlock_t lock;
|
||||
int range[2];
|
||||
};
|
||||
|
||||
struct netns_ipv4 {
|
||||
#ifdef CONFIG_SYSCTL
|
||||
|
@ -62,6 +66,8 @@ struct netns_ipv4 {
|
|||
int sysctl_icmp_ratemask;
|
||||
int sysctl_icmp_errors_use_inbound_ifaddr;
|
||||
|
||||
struct local_ports sysctl_local_ports;
|
||||
|
||||
int sysctl_tcp_ecn;
|
||||
|
||||
kgid_t sysctl_ping_group_range[2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue