summaryrefslogtreecommitdiff
path: root/source3/namework.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-08-01 17:49:40 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-08-01 17:49:40 +0000
commit3ffb30e8be5bcddca9d0489e1993085a4995c3af (patch)
treea36a093e5ede9021bc01ca5d50cae3d82ac3bbea /source3/namework.c
parent9bf446124b5ad991e071f92eeabcbb838eb9f50b (diff)
downloadsamba-3ffb30e8be5bcddca9d0489e1993085a4995c3af.tar.gz
samba-3ffb30e8be5bcddca9d0489e1993085a4995c3af.tar.bz2
samba-3ffb30e8be5bcddca9d0489e1993085a4995c3af.zip
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)
Diffstat (limited to 'source3/namework.c')
-rw-r--r--source3/namework.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/source3/namework.c b/source3/namework.c
index 1a7a48aa9a..74c567fa74 100644
--- a/source3/namework.c
+++ b/source3/namework.c
@@ -284,17 +284,12 @@ static void process_announce(struct packet_struct *p,uint16 command,char *buf)
tell_become_backup();
#endif
- /* XXXX over-kill: i don't think we should really be doing this,
- but it doesn't do much harm other than to add extra network
- traffic. to be more precise, we should (possibly) only
- sync browse lists with a host that sends an
- ANN_LocalMasterAnnouncement or an ANN_DomainAnnouncement.
- possibly.
- */
-
- /* get their browse list from them and add it to ours. */
- add_browser_entry(serv_name,dgram->dest_name.name_type,
- work->work_group,30,ip);
+ /* get the local_only browse list from the local master and add it to ours. */
+ if (command == ANN_LocalMasterAnnouncement)
+ {
+ add_browser_entry(serv_name,dgram->dest_name.name_type,
+ work->work_group,30,ip,True);
+ }
}
/*******************************************************************
@@ -319,13 +314,13 @@ static void process_master_announce(struct packet_struct *p,char *buf)
if (!lp_domain_master()) return;
for (work = mydomain->workgrouplist; work; work = work->next)
+ {
+ if (AM_MASTER(work))
{
- if (AM_MASTER(work))
- {
/* merge browse lists with them */
- add_browser_entry(name,0x1b, work->work_group,30,ip);
- }
+ add_browser_entry(name,0x1b, work->work_group,30,ip,True);
}
+ }
}
/*******************************************************************
@@ -394,7 +389,8 @@ static void process_rcv_backup_list(struct packet_struct *p,char *buf)
if (work->token == 0 /* token */)
{
queue_netbios_packet(d1,ClientNMB,NMB_QUERY,NAME_QUERY_SRV_CHK,
- work->work_group,0x1d,0,0,
+ work->work_group,0x1d,
+ 0,0,0,NULL,NULL,
False,False,back_ip,back_ip);
return;
}