diff options
author | Samba Release Account <samba-bugs@samba.org> | 1996-08-01 17:49:40 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1996-08-01 17:49:40 +0000 |
commit | 3ffb30e8be5bcddca9d0489e1993085a4995c3af (patch) | |
tree | a36a093e5ede9021bc01ca5d50cae3d82ac3bbea /source3/namebrowse.c | |
parent | 9bf446124b5ad991e071f92eeabcbb838eb9f50b (diff) | |
download | samba-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/namebrowse.c')
-rw-r--r-- | source3/namebrowse.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/namebrowse.c b/source3/namebrowse.c index e62aa1ec6d..b426bc7a15 100644 --- a/source3/namebrowse.c +++ b/source3/namebrowse.c @@ -94,7 +94,7 @@ void expire_browse_cache(time_t t) add a browser entry ****************************************************************************/ struct browse_cache_record *add_browser_entry(char *name, int type, char *wg, - time_t ttl, struct in_addr ip) + time_t ttl, struct in_addr ip, BOOL local) { BOOL newentry=False; @@ -135,6 +135,7 @@ struct browse_cache_record *add_browser_entry(char *name, int type, char *wg, b->ip = ip; b->type = type; + b->local = local; /* local server list sync or complete sync required */ if (newentry || ttl < b->sync_time) b->sync_time = ttl; @@ -176,8 +177,9 @@ static void start_sync_browse_entry(struct browse_cache_record *b) doesn't, the server must have died. o dear. */ /* see response_netbios_packet() or expire_netbios_response_entries() */ - queue_netbios_packet(d,ClientNMB,NMB_QUERY,NAME_QUERY_SYNC, - b->group,0x20,0,0, + queue_netbios_packet(d,ClientNMB,NMB_QUERY, + b->local?NAME_QUERY_SYNC_LOCAL:NAME_QUERY_SYNC_REMOTE, + b->group,0x20,0,0,0,NULL,NULL, False,False,b->ip,b->ip); } |