summaryrefslogtreecommitdiffstats
path: root/source/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-02-26 19:26:18 +0000
committerJeremy Allison <jra@samba.org>1998-02-26 19:26:18 +0000
commit1feb54e1ba27ab8aba2df4ebef4df010ca980f12 (patch)
tree7472ceb71b872666ad4b2c36c5afbf9549f70cf0 /source/nmbd
parenteb71c5edcbb983ed4a1b0f57139bd66b671c67fa (diff)
downloadsamba-1feb54e1ba27ab8aba2df4ebef4df010ca980f12.tar.gz
samba-1feb54e1ba27ab8aba2df4ebef4df010ca980f12.tar.xz
samba-1feb54e1ba27ab8aba2df4ebef4df010ca980f12.zip
Code to work around a bug in FTP OnNet software NBT implementation.
They do a broadcast name release for WORKGROUP<0> and WORKGROUP<1e> names and *don't set the group bit*. Jeremy.
Diffstat (limited to 'source/nmbd')
-rw-r--r--source/nmbd/nmbd_incomingrequests.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/nmbd/nmbd_incomingrequests.c b/source/nmbd/nmbd_incomingrequests.c
index 57517c37345..ae163c60145 100644
--- a/source/nmbd/nmbd_incomingrequests.c
+++ b/source/nmbd/nmbd_incomingrequests.c
@@ -29,6 +29,7 @@
#include "includes.h"
extern int DEBUGLEVEL;
+extern fstring myworkgroup;
/****************************************************************************
Send a name release response.
@@ -95,6 +96,21 @@ subnet %s from owner IP %s\n",
if( group && !ismyip(owner_ip) )
return;
+ /*
+ * Code to work around a bug in FTP OnNet software NBT implementation.
+ * They do a broadcast name release for WORKGROUP<0> and WORKGROUP<1e>
+ * names and *don't set the group bit* !!!!!
+ */
+
+ if( !group && !ismyip(owner_ip) && strequal(question->name, myworkgroup) &&
+ ((question->name_type == 0x0) || (question->name_type == 0x1e)))
+ {
+ DEBUG(6,("process_name_release_request: FTP OnNet bug workaround. Ignoring \
+group release name %s from IP %s on subnet %s with no group bit set.\n",
+ namestr(question), inet_ntoa(owner_ip), subrec->subnet_name ));
+ return;
+ }
+
namerec = find_name_on_subnet(subrec, &nmb->question.question_name, FIND_ANY_NAME);
/* We only care about someone trying to release one of our names. */