summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-27 01:30:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:49 -0500
commit5ae448116165a6bb9d792686db825b8b47f27201 (patch)
tree1d0d1681b2a0f2a06df51389c0f47f2dd2d47989 /source4
parentb9ddb09f03332a9c4442e61bb5c73f7bde04d1d6 (diff)
downloadsamba-5ae448116165a6bb9d792686db825b8b47f27201.tar.gz
samba-5ae448116165a6bb9d792686db825b8b47f27201.tar.bz2
samba-5ae448116165a6bb9d792686db825b8b47f27201.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c21
1 files changed, 3 insertions, 18 deletions
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;