Samba's response to a node status query includes a MAC Addr of 0:0:0:0:0:0

Christopher R. Hertel crh at ubiqx.mn.org
Sat Apr 17 02:26:26 GMT 2004


On Fri, Apr 16, 2004 at 11:20:30AM -0700, Richard Sharpe wrote:
> Hi,
> 
> In looking at the output from the nmblookup -A <node-name> command, I 
> noticed that Samba is responding incorrectly to a node status query.

Not really.

> We are returning all zeros for the piece after the list of names, when we 
> should probably return at least the MAC address of the interface that the 
> query packet came in on (if we can figure that out) or the MAC addr of the 
> primary interface ...
> 
> I imagine that that code is in nmbd.
> 
> Would it be important to fix?

Not important.  We've done it this way for a very, very long time.  There 
have, in the past, been a few people who have asked for us to add this but 
their reasons were generally loopy.  Trying to use node status queries to 
inventory the systems on their network, for instance (forgetting that not 
all systems run NBT).

The first block of the Node Status Response has the registered name list, 
and that is consistent across many transport protocols, etc.  The rest 
varies wildly depending on the transport, the stack implementation, etc.  
In the old days when everyone (DEC, Banyan, IBM, etc., etc.) had their own 
NetBIOS implementation on top of their own hardware/software, they would 
format the statistics section to suit their own needs.

The statistics block that Microsoft returns does *not* match the RFCs.  
Samba does match the RFCs, at least in the size of the returned block. I
think I reported that to the Ethereal crew once, as Ethereal (ancient
revision) was using the RFC parsing which didn't work for replies sent
from Windows boxes.  It just happens that the RFC structure and
Microsoft's both have the MAC address in the same place, so we *could* put
the MAC address in there.

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
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 samba-technical mailing list