提交 0ce091dd 编写于 作者: W Wesley Wang 提交者: guangshu.wgs

Fix the problem that ops_ip_copy will not copy when dst has no family

上级 b5f98a6e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册