gazelle/0052-ipv6.patch
yinbin a377d16774 sync ipv6
(cherry picked from commit 4662eaed3baa88a8b608912845a689e45b65e39a)
2023-12-10 16:51:27 +08:00

26 lines
981 B
Diff

From 894c59a8e2351f0c0b34e3582054a696a913f114 Mon Sep 17 00:00:00 2001
From: zhengjiebing <zhengjiebing_yewu@cmss.chinamobile.com>
Date: Sat, 18 Nov 2023 00:44:43 +0800
Subject: [PATCH] ipv6
---
src/lstack/api/lstack_wrap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
index 1e67b76..b6ac1bd 100644
--- a/src/lstack/api/lstack_wrap.c
+++ b/src/lstack/api/lstack_wrap.c
@@ -370,7 +370,7 @@ static inline int32_t do_socket(int32_t domain, int32_t type, int32_t protocol)
return posix_api->socket_fn(domain, type, protocol);
}
- if ((domain != AF_INET && domain != AF_UNSPEC) ||
+ if ((domain != AF_INET && domain != AF_UNSPEC && domain != AF_INET6) ||
((domain == AF_INET6) && !get_global_cfg_params()->ipv6_enable) ||
((type & SOCK_DGRAM) && !get_global_cfg_params()->udp_enable)) {
return posix_api->socket_fn(domain, type, protocol);
--
2.27.0