Commit f07a514b authored by Zhengchao Shao's avatar Zhengchao Shao
Browse files

tcp: fix compilation issue when CONFIG_SYSCTL is disabled

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8Y7PX


CVE: NA

--------------------------------

The following error is reported when the kernel is compiled with
CONFIG_SYSCTL disabled:
   aarch64-linux-ld: net/ipv4/inet_hashtables.o: in function `__inet_hash_connect':
   inet_hashtables.c:(.text+0x3564): undefined reference to `sysctl_local_port_allocation'
   aarch64-linux-ld: net/ipv4/inet_hashtables.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `sysctl_local_port_allocation' which may bind externally can not be used when making a shared object; recompile with -fPIC
>> inet_hashtables.c:(.text+0x3564): dangerous relocation: unsupported relocation
   aarch64-linux-ld: inet_hashtables.c:(.text+0x3568): undefined reference to `sysctl_local_port_allocation'
   aarch64-linux-ld: inet_hashtables.c:(.text+0x3580): undefined reference to `sysctl_local_port_allocation'
When CONFIG_SYSCTL is disabled, sysctl_local_port_allocation is
undefined.

Fixes: 208a7204 ("tcp/dccp: Add another way to allocate local ports in connect()")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401180939.2N529UUe-lkp@intel.com/


Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 61a1dd4f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment