Skip to contentSkip to conversation

selftests: net: ip_local_port_range: define IPPROTO_MPTCP

PATCH Applied Maxim Galaganov 4 participants 4 messages Feb 9, 2024 – Feb 13, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 0f217a1cc837..6ebd58869a63 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw

Hi Maxim, Naresh,

Quoted 10 lines · Maxim Galaganov

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.

Thank you both for the fix and the bug report!

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.
Tested-by Linux Kernel Functional Testing
#2 lore raw
Quoted 10 lines · Matthieu Baerts

Hi Maxim, Naresh,

Quoted 6 lines · Maxim Galaganov

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.

Quoted 8 lines
Quoted 4 lines

Thank you both for the fix and the bug report!

--
Linaro LKFT
https://lkft.linaro.org

#3 lore raw
In reply to Maxim Galaganov
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.h may leave IPPROTO_MPTCP undefined when building ip_local_port_range.c, that leads to "error: use of undeclared identifier 'IPPROTO_MPTCP'".

Quoted 8 lines

Define IPPROTO_MPTCP in such cases, just like in other MPTCP selftests.

[...]

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