summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/rpc/dcerpc_util.c')
-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;