summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-01-11 09:48:27 +0000
committerAndrew Tridgell <tridge@samba.org>2002-01-11 09:48:27 +0000
commit034a855d73471c4c94ee71ea7644c6e3e02b8b74 (patch)
tree2a84a72c732c5336c5449d8431305e22dc52fd08 /source3/libsmb
parente2584de0547f7c273eb1be2415e2317a4722548d (diff)
downloadsamba-034a855d73471c4c94ee71ea7644c6e3e02b8b74.tar.gz
samba-034a855d73471c4c94ee71ea7644c6e3e02b8b74.tar.bz2
samba-034a855d73471c4c94ee71ea7644c6e3e02b8b74.zip
cope with direct IP addresses in resolve_name()
(This used to be commit 73a59170e6fab3b0f91938a74302750915a04a7a)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/namequery.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index d7e0af11df..e410363de8 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -954,6 +954,11 @@ BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type)
struct in_addr *ip_list = NULL;
int count = 0;
+ if (is_ipaddress(name)) {
+ *return_ip = *interpret_addr2(name);
+ return True;
+ }
+
if (internal_resolve_name(name, name_type, &ip_list, &count)) {
int i;
/* only return valid addresses for TCP connections */