1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r3330: Use IPv6 for RPC client connections if we can

This commit is contained in:
Jelmer Vernooij 2004-10-28 19:14:26 +00:00 committed by Gerald (Jerry) Carter
parent d829890124
commit 9426a65535

View File

@ -361,7 +361,15 @@ static NTSTATUS dcerpc_pipe_open_socket(struct dcerpc_pipe **p,
*/
NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p, const char *server, uint32_t port)
{
return dcerpc_pipe_open_socket(p, server, port, "ip", NCACN_IP_TCP);
NTSTATUS status;
/* Try IPv6 first */
status = dcerpc_pipe_open_socket(p, server, port, "ipv6", NCACN_IP_TCP);
if (NT_STATUS_IS_OK(status)) {
return status;
}
return dcerpc_pipe_open_socket(p, server, port, "ipv4", NCACN_IP_TCP);
}
/*