From 3ffb30e8be5bcddca9d0489e1993085a4995c3af Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Thu, 1 Aug 1996 17:49:40 +0000 Subject: local_only NetServerEnum syncs can now be issued. bug spotted in nameservresp.c - arguments to test subnet the response is received on (same_net()) were the wrong way round (ccm@shentel.net) samba was adding WORKGROUP(1e) as a unique not a group name: fixed this bug in reply_name_status() and reply_name_query(): WINS entries weren't being looked up. name status reply adds local SELF entries to WINS SELF entries: some SELF entries are only added locally, while others are only added via WINS. name status needs to have both, combined. a sync will only occur when an ANN_LocalMasterAnnouncement is received, NOT an ANN_HostAnnouncement or an ANN_DomainAnnouncement. when samba is a member of a workgroup, it looks for (using a wins server) and announces to its domain master. NAME_QUERY_ANNOUNCE_HOST - yet another 'state' - has been created to do this: do the name query on the wins server and send the announce host to the answer to this query. jeremy @ vantive wrote the original code to do this, which used the name_query() function. i'm trying to avoid name_query: it times out and generally messes things up, but using queue_netbios_packet() and queue_netbios_pkt_wins() is... not intuitive? lkcl with help from jra (This used to be commit 6e932e4bae8b46e7ff4a55a75484bad78308336a) --- source3/nameresp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/nameresp.c') diff --git a/source3/nameresp.c b/source3/nameresp.c index 0f76323df0..7fcb41e79f 100644 --- a/source3/nameresp.c +++ b/source3/nameresp.c @@ -224,6 +224,7 @@ void expire_netbios_response_entries() struct response_record *queue_netbios_pkt_wins(struct subnet_record *d, int fd,int quest_type,enum state_type state, char *name,int name_type,int nb_flags, time_t ttl, + int server_type, char *my_name, char *my_comment, BOOL bcast,BOOL recurse, struct in_addr send_ip, struct in_addr reply_to_ip) { @@ -256,6 +257,7 @@ struct response_record *queue_netbios_pkt_wins(struct subnet_record *d, return queue_netbios_packet(d,fd, quest_type, state, name, name_type, nb_flags, ttl, + server_type,my_name,my_comment, bcast, recurse, send_ip, reply_to_ip); } @@ -269,8 +271,9 @@ struct response_record *queue_netbios_pkt_wins(struct subnet_record *d, struct response_record *queue_netbios_packet(struct subnet_record *d, int fd,int quest_type,enum state_type state,char *name, int name_type,int nb_flags, time_t ttl, - BOOL bcast,BOOL recurse, - struct in_addr send_ip, struct in_addr reply_to_ip) + int server_type, char *my_name, char *my_comment, + BOOL bcast,BOOL recurse, + struct in_addr send_ip, struct in_addr reply_to_ip) { struct in_addr wins_ip = ipgrp; struct response_record *n; @@ -289,6 +292,7 @@ struct response_record *queue_netbios_packet(struct subnet_record *d, if ((n = make_response_queue_record(state,id,fd, quest_type,name,name_type,nb_flags,ttl, + server_type,my_name, my_comment, bcast,recurse,send_ip,reply_to_ip))) { add_response_record(d,n); -- cgit