[jcifs] issue with nbns response

Christopher R. Hertel crh at ubiqx.mn.org
Fri Aug 30 13:25:03 EST 2002


Ashish Nigam wrote:
> 
> Hi,
> I was having problem with some windows 95 boxes.

Older ones.  Early revisions.

> Node status request was failing invariably if i use JCIFS but it went
> thru if use nbtstat -A <ip>.

Right.  Known bug in Windows95.

> After some dileberation, I decided to look at the difference in packets.
> Well, the difference is in destination port value in UDP packet.

Yep.

> And the problem is that destination port in UDP response packet is
> always 137 for those windows 95 boxes.

Which is a bug.  A UDP response should always go back to the port from which
the request was sent.  Early versions of W/95 got this wrong, and hard-coded
the value 137.

This isn't a problem for Windows boxes because the NBT layer is built
into the kernel, so all NBT Name Service traffic is sent and received via
port 137.  Samba avoids the problem in a very awkward way.  The nmbd
daemon runs on port 137 and will receive these misdirected replies. 
Application programs (such as nmblookup) can grab those packets if
needed.  If you run nmblookup on a system that doesn't have nmbd running,
you will get the same results as with jCIFS.  If you run nmblookup on a
system that does have nmbd, then there will be a bit of a delay (due to
timeouts) but you will be able to read the response.

> In most of the cases it is the
> "unused UDP source port" of the request and JCIFS used to get thru.

I don't understand that sentance.

> So what can be done for these boxes???? Any ideas...

Install all service packs and see if that helps, or try forcing jCIFS to run
on port 137 (requires root privilage if you're running on a *nix box).

> Thanks,
> ashish

Welcome,
Chris -)-----

-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the jcifs mailing list