From 5ae448116165a6bb9d792686db825b8b47f27201 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 27 Oct 2004 01:30:59 +0000 Subject: r3277: don't use the non-portable getaddrinfo() function, instead use interpret_addr() and if someone wants to add support to that function for ipv6 then they are welcome to. (This used to be commit 50377db11bb727b407744e0c50805c8f90810c16) --- source4/librpc/rpc/dcerpc_util.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'source4') diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 89a4366b96..cbdb0f2069 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -440,25 +440,10 @@ static NTSTATUS dcerpc_floor_set_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor return NT_STATUS_OK; case EPM_PROTOCOL_IP: - floor->rhs.ip.address = 0; - - /* Only try to put in a IPv4 address. Windows 2003 just returns - * 0.0.0.0 for IPv6 addresses */ if (strlen(data) > 0) { - struct addrinfo hints, *res; - - memset(&hints, 0, sizeof(struct addrinfo)); - - hints.ai_family = AF_INET; - hints.ai_protocol = PF_INET; - - if (getaddrinfo(data, NULL, &hints, &res) < 0) { - return NT_STATUS_BAD_NETWORK_NAME; - } - - floor->rhs.ip.address = ntohl(((struct sockaddr_in *)res->ai_addr)->sin_addr.s_addr); - - freeaddrinfo(res); + floor->rhs.ip.address = interpret_addr(data); + } else { + floor->rhs.ip.address = 0; } return NT_STATUS_OK; -- cgit