提交 98d81456 编写于 作者: S SummerGift

[nfs] : fix bug in nfs when enable ipv6

上级 9644678d
......@@ -62,7 +62,15 @@ CLIENT *clnt_create (const char *hostname, const unsigned long prog,
memset((char*)&sin,0,sizeof(sin));
sin.sin_family = h->h_addrtype;
sin.sin_port = 0;
memmove((char *) &sin.sin_addr, h->h_addr, h->h_length);
if (h->h_addrtype == AF_INET)
{
memmove((char *) &sin.sin_addr, h->h_addr, sizeof(sin.sin_addr));
}
else
{
return NULL;
}
sock = -1;
if (strcmp(proto, "udp") == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册