selftests: net: ip_local_port_range: define IPPROTO_MPTCP
Subsystems (3)
PATCH 1/1 selftests: net: ip_local_port_range: define IPPROTO_MPTCP
Older glibc's netinet/in.h may leave IPPROTO_MPTCP undefined when building ip_local_port_range.c, that leads to "error: use of undeclared identifier 'IPPROTO_MPTCP'".
Define IPPROTO_MPTCP in such cases, just like in other MPTCP selftests.
--- tools/testing/selftests/net/ip_local_port_range.c | 4 ++++ 1 file changed, 4 insertions(+)
tools/testing/selftests/net/ip_local_port_range.c +4 -0
@@ -16,6 +16,10 @@#define IP_LOCAL_PORT_RANGE 51#endif +#ifndef IPPROTO_MPTCP +#define IPPROTO_MPTCP 262 +#endif +static __u32 pack_port_range (__u16 lo,__u16 hi) {return (hi <<16 ) | (lo <<0 );
Signature · 1 line
2.43.0
Hi Maxim, Naresh,
Quoted 10 lines · Maxim Galaganov
Older glibc's
netinet/in.hmay leaveIPPROTO_MPTCPundefined when buildingip_local_port_range.c, that leads to "error: use of undeclared identifier 'IPPROTO_MPTCP'".Define
IPPROTO_MPTCPin such cases, just like in other MPTCP selftests.Fixes 122db5e3634b ("selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE")Closes https://lore.kernel.org/netdev/CA+G9fYvGO5q4o_Td_kyQgYieXWKw6ktMa-Q0sBu6S-0y3w2aEQ@mail.gmail.com/ open hereSigned-off-by Maxim Galaganov <[email protected]>
Thank you both for the fix and the bug report!
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Naresh Kamboju
Tested-by Linux Kernel Functional TestingQuoted 10 lines · Matthieu Baerts
Hi Maxim, Naresh,
Quoted 6 lines · Maxim Galaganov
Older glibc's
netinet/in.hmay leaveIPPROTO_MPTCPundefined when buildingip_local_port_range.c, that leads to "error: use of undeclared identifier 'IPPROTO_MPTCP'".Define
IPPROTO_MPTCPin such cases, just like in other MPTCP selftests.
Quoted 8 lines
Quoted 4 lines
Fixes 122db5e3634b ("selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE")Closes https://lore.kernel.org/netdev/CA+G9fYvGO5q4o_Td_kyQgYieXWKw6ktMa-Q0sBu6S-0y3w2aEQ@mail.gmail.com/ open hereSigned-off-by Maxim Galaganov <[email protected]>Thank you both for the fix and the bug report!
--
Linaro LKFT
https://lkft.linaro.org
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 4 lines · On Fri, 9 Feb 2024 16:25:11 +0300 you wrote:
Older glibc's
netinet/in.hmay leaveIPPROTO_MPTCPundefined when buildingip_local_port_range.c, that leads to "error: use of undeclared identifier 'IPPROTO_MPTCP'".
Quoted 8 lines
Define
IPPROTO_MPTCPin such cases, just like in other MPTCP selftests.Fixes 122db5e3634b ("selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE")Closes https://lore.kernel.org/netdev/CA+G9fYvGO5q4o_Td_kyQgYieXWKw6ktMa-Q0sBu6S-0y3w2aEQ@mail.gmail.com/ open hereSigned-off-by Maxim Galaganov <[email protected]>[...]
Here is the summary with links:
- [net] selftests: net: ip_local_port_range: define IPPROTO_MPTCP
https://git.kernel.org/netdev/net/c/c2b3ec36b422
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html