Skip to contentSkip to conversation

Qperf support for ipv4 when ipv6 is disabled at protocol layer

PATCH New sababu 1 participant 1 message May 30, 2022

lore
Share & tools
lore

sababu

author
#0 lore raw

PATCH 1/1 Qperf support for ipv4 when ipv6 is disabled at protocol layer

From: sababu <[email protected]>

With qperf version 0.4.9 we defined AI_FAMILY as AF_UNSPEC, starting qperf 0.4.11 the same is changed to AF_INET6 which causes issues when ipv6 is disabled at protocol layer (as a kernel command line arguement). This patch reverses the behavior.

---
 src/qperf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/qperf.c +1 -1
index 89fe5b8..4de0cce 100644
@@ -1418,7 +1418,7 @@ server_listen(void)
     AI *ai;
     AI hints ={
         .ai_flags    = AI_PASSIVE | AI_NUMERICSERV,
-	.ai_family   = AF_INET6,
+	.ai_family   = AF_UNSPEC,
         .ai_socktype = SOCK_STREAM
     };
     AI *ailist = getaddrinfo_port(0, ListenPort, &hints);
Signature · 1 line
2.31.1