summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-02-27 10:06:53 +0100
committerMichael Adam <obnox@samba.org>2008-02-27 10:06:56 +0100
commit71ab53a13be17c50ed7e640290407f0dca11db3c (patch)
treed3370d52352c3557b8d8f09880f2a1765ee36ce6 /source3
parent6fb37ae6725acda88876d92061a4db39f53cbf0a (diff)
downloadsamba-71ab53a13be17c50ed7e640290407f0dca11db3c.tar.gz
samba-71ab53a13be17c50ed7e640290407f0dca11db3c.tar.bz2
samba-71ab53a13be17c50ed7e640290407f0dca11db3c.zip
Fix caller of node_status_query() to use sockaddr_storage().
Caller is hidden inside an #ifdef . Michael (This used to be commit 4a0d1ad601facf158db0c1d1c320e9e1369093d0)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/wins.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/nsswitch/wins.c b/source3/nsswitch/wins.c
index c822fc78b9..35649dfda2 100644
--- a/source3/nsswitch/wins.c
+++ b/source3/nsswitch/wins.c
@@ -147,7 +147,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
static NODE_STATUS_STRUCT *lookup_byaddr_backend(char *addr, int *count)
{
int fd;
- struct in_addr ip;
+ struct sockaddr_storage ss;
struct nmb_name nname;
NODE_STATUS_STRUCT *status;
@@ -160,8 +160,10 @@ static NODE_STATUS_STRUCT *lookup_byaddr_backend(char *addr, int *count)
return NULL;
make_nmb_name(&nname, "*", 0);
- (void)interpret_addr2(&ip,addr);
- status = node_status_query(fd,&nname,ip, count, NULL);
+ if (!interpret_string_addr(&ss, addr, AI_NUMERICHOST)) {
+ return NULL;
+ }
+ status = node_status_query(fd, &nname, &ss, count, NULL);
close(fd);
return status;