Commit 43fb4632 authored by Gerald Carter's avatar Gerald Carter Committed by Gerald (Jerry) Carter
Browse files

r376: BUG 1288: resolve any machine netbios name (0x00) and not just servers (0x20)

(This used to be commit d96929b5b1d8d149ac023a30964925952587c258)
parent f7894811
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
	*count = 0;

	/* always try with wins first */
	if (resolve_wins(name,0x20,&address,count)) {
	if (resolve_wins(name,0x00,&address,count)) {
		if ( (ret = (struct in_addr *)malloc(sizeof(struct in_addr))) == NULL ) {
			free( address );
			return NULL;
@@ -118,7 +118,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
	/* uggh, we have to broadcast to each interface in turn */
	for (j=iface_count() - 1;j >= 0;j--) {
		struct in_addr *bcast = iface_n_bcast(j);
		ret = name_query(fd,name,0x20,True,True,*bcast,count, &flags, NULL);
		ret = name_query(fd,name,0x00,True,True,*bcast,count, &flags, NULL);
		if (ret) break;
	}