From 748d65a4ac898708dc7d2fd6f2bdee41489fee86 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 20 Aug 1996 15:45:16 +0000 Subject: - fix a bug in NetServerEnum where counted and total were not counted correctly if there were multiple instances of a name. This led to the infamous "not enough memory" error when browsing (but this isn't the only cause of that message) - fix a triple-chaining bug which affected OpenX following a TconX - fix a serious nmbd bug that meant nmdb would answer packets that it wasn't supposed to, causing havoc with browse lists. - never time out SELF packets. This is an interim fix until I find out why nmbd thought they should be timed out. (This used to be commit 2960c3908c2c3b01a1f2b77def60350018d298e1) --- source3/namework.c | 80 ------------------------------------------------------ 1 file changed, 80 deletions(-) (limited to 'source3/namework.c') diff --git a/source3/namework.c b/source3/namework.c index 108048d500..90ab2fb1fb 100644 --- a/source3/namework.c +++ b/source3/namework.c @@ -165,22 +165,6 @@ BOOL same_context(struct dgram_packet *dgram) } -/******************************************************************* - am I listening on a name. XXXX check the type of name as well. - ******************************************************************/ -BOOL listening_name(struct work_record *work, struct nmb_name *n) -{ - if (strequal(n->name,myname) || - strequal(n->name,work->work_group) || - strequal(n->name,MSBROWSE)) - { - return(True); - } - - return(False); -} - - /******************************************************************* process a domain announcement frame @@ -667,70 +651,6 @@ static void process_announce_request(struct packet_struct *p,char *buf) } -/**************************************************************************** -depending on what announce has been made, we are only going to -accept certain types of name announce. XXXX untested code - -check listening name type -****************************************************************************/ -BOOL listening_type(struct packet_struct *p, int command) -{ - struct dgram_packet *dgram = &p->packet.dgram; - int type = dgram->dest_name.name_type; - - switch (command) - { - case ANN_HostAnnouncement: - { - if (type != 0x0 || type != 0x20) return (False); - break; - } - - case ANN_AnnouncementRequest: - { - return (True); - break; - } - - case ANN_Election: - { - return (True); - break; - } - - case ANN_GetBackupListReq: - { - return (True); - break; - } - - case ANN_GetBackupListResp: - { - return (True); - break; - } - - case ANN_DomainAnnouncement: - { - if (type != 0x1b || type != 0x1c) return (False); - break; - } - - case ANN_MasterAnnouncement: - { - if (type != 0x1d) return (False); - break; - } - - case ANN_LocalMasterAnnouncement: - { - if (type != 0x1c || type != 0x1d) return (False); - break; - } - } - return (True); /* we're not dealing with unknown packet types */ -} - /**************************************************************************** process a browse frame -- cgit