summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-14 12:56:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:42:34 -0500
commitf197180d8dc7b052af0fcb47a797bdb1c96019e2 (patch)
tree0d370e7c34dacb5a4f9d6a02ede88ae79623fc96 /source4
parent3d7c2443b82b3770858c236bdcd11c3d649ead75 (diff)
downloadsamba-f197180d8dc7b052af0fcb47a797bdb1c96019e2.tar.gz
samba-f197180d8dc7b052af0fcb47a797bdb1c96019e2.tar.bz2
samba-f197180d8dc7b052af0fcb47a797bdb1c96019e2.zip
r11042: r10361@SERNOX: metze | 2005-09-20 22:36:28 +0200
we should only use 255.255.255.255 for group records, only when we reply, not when the name is registered. the real address is used for replication metze (This used to be commit 45a774c63cbbe4dbd6e17510cf2c7d59d30ea9be)
Diffstat (limited to 'source4')
-rw-r--r--source4/nbt_server/wins/winsserver.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c
index d5043caa29..8a5fabae4e 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -61,9 +61,6 @@ static uint8_t wins_register_new(struct nbt_name_socket *nbtsock,
rec.addresses = winsdb_addr_list_make(packet);
if (rec.addresses == NULL) return NBT_RCODE_SVR;
- if (IS_GROUP_NAME(name, nb_flags)) {
- address = WINSDB_GROUP_ADDRESS;
- }
rec.addresses = winsdb_addr_list_add(rec.addresses,
address,
WINSDB_OWNER_LOCAL,
@@ -200,10 +197,20 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock,
return;
}
- addresses = winsdb_addr_string_list(packet, rec->addresses);
- if (addresses == NULL) {
- nbtd_negative_name_query_reply(nbtsock, packet, src);
- return;
+ if (IS_GROUP_NAME(name, rec->nb_flags)) {
+ addresses = talloc_array(packet, const char *, 2);
+ if (addresses == NULL) {
+ nbtd_negative_name_query_reply(nbtsock, packet, src);
+ return;
+ }
+ addresses[0] = WINSDB_GROUP_ADDRESS;
+ addresses[1] = NULL;
+ } else {
+ addresses = winsdb_addr_string_list(packet, rec->addresses);
+ if (addresses == NULL) {
+ nbtd_negative_name_query_reply(nbtsock, packet, src);
+ return;
+ }
}
nbtd_name_query_reply(nbtsock, packet, src, name,