summaryrefslogtreecommitdiff
path: root/source4/libcli/resolve/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/resolve/resolve.c')
-rw-r--r--source4/libcli/resolve/resolve.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index 733eddf643..d62890434b 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -144,6 +144,15 @@ struct composite_context *resolve_name_send(struct nbt_name *name, struct event_
c->event_ctx = talloc_reference(c, event_ctx);
}
+ if (is_ipaddress(state->name.name) ||
+ strcasecmp(state->name.name, "localhost") == 0) {
+ struct ipv4_addr ip = interpret_addr2(state->name.name);
+ state->reply_addr = talloc_strdup(state, sys_inet_ntoa(ip));
+ if (!state->reply_addr) goto failed;
+ composite_trigger_done(c);
+ return c;
+ }
+
state->req = setup_next_method(c);
if (state->req == NULL) goto failed;