From 0ce091dd73163eff260b0924da909439a5f5bae8 Mon Sep 17 00:00:00 2001 From: Wesley Wang Date: Thu, 24 Jun 2021 15:58:46 +0800 Subject: [PATCH] Fix the problem that ops_ip_copy will not copy when dst has no family --- src/obproxy/iocore/net/ob_inet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/obproxy/iocore/net/ob_inet.h b/src/obproxy/iocore/net/ob_inet.h index 2beebae..c7b3147 100644 --- a/src/obproxy/iocore/net/ob_inet.h +++ b/src/obproxy/iocore/net/ob_inet.h @@ -562,6 +562,10 @@ inline bool ops_ip_copy(sockaddr &dst, const sockaddr &src) case AF_INET6: n2 = sizeof(sockaddr_in6); break; + + default: + n2 = sizeof(sockaddr_in); + break; } if (n && n <= n2) { MEMCPY(&dst, &src, n); -- GitLab