Code to work around a bug in FTP OnNet software NBT implementation.
authorJeremy Allison <jra@samba.org>
Thu, 26 Feb 1998 19:26:18 +0000 (19:26 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 26 Feb 1998 19:26:18 +0000 (19:26 +0000)
They do a broadcast name release for WORKGROUP<0> and WORKGROUP<1e>
names and *don't set the group bit*.

Jeremy.
(This used to be commit 1feb54e1ba27ab8aba2df4ebef4df010ca980f12)

source3/nmbd/nmbd_incomingrequests.c

index 57517c373450bfcb37982d1083b0b486c3ebcabc..ae163c601459e74ad2787647c80903cc63692672 100644 (file)
@@ -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. */