hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IARV38
--------------------------------
Fix the below error when disable CONFIG_PROC_SYSCTL compile macro: aarch64-linux-gnu-ld: net/ipv4/inet_hashtables.o: in \ function `__inet_hash_connect': net/ipv4/inet_hashtables.c:759: undefined reference to \ `sysctl_local_port_allocation'
Fixes: 726c52655f7 ("tcp/dccp: Add another way to allocate local ports in connect()") Signed-off-by: Liu Jian liujian56@huawei.com --- net/ipv4/inet_hashtables.c | 2 ++ net/ipv4/sysctl_net_ipv4.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 1ca02944ae90..1894cf014129 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -28,6 +28,8 @@ #include <net/tcp.h> #include <net/sock_reuseport.h>
+int sysctl_local_port_allocation; + static u32 inet_ehashfn(const struct net *net, const __be32 laddr, const __u16 lport, const __be32 faddr, const __be16 fport) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index a013df55e933..207a8b00a77d 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -51,7 +51,6 @@ static int comp_sack_nr_max = 255; static u32 u32_max_div_HZ = UINT_MAX / HZ; static int one_day_secs = 24 * 3600;
-int sysctl_local_port_allocation; /* obsolete */ static int sysctl_tcp_low_latency __read_mostly;