questionable code in nmbd/nmbd_packets.c?

Luke Kenneth Casson Leighton lkcl at
Wed Aug 4 17:45:15 GMT 1999

On Thu, 5 Aug 1999, Cole, Timothy D. wrote:

> I've been trying to nail down some strange behavior with Samba over the
> course of many months, and I've finally narrowed it down to the following
> code in nmbd/nmbd_packet.c, lines 1080-1088:
>       /* This is one occasion where we change a subnet that is
>         given to us. If the packet was sent to WORKGROUP<1b> instead
>         of WORKGROUP<1d> then it was unicast to us a domain master
>         browser. Change subrec to unicast.
>       */

this is faulty logic.  where a request comes in from is completely
independent of the name itself.

changing the subnet like this means that the response may not be matched
up with the request.

each transport, where a subnet is also a transport, maintains its own list
of NetBIOS names.  by changing subrec to unicast we are replying to a
totally different NetBIOS transport.

this is a bug.

More information about the samba-technical mailing list