nmb log file entry

Jeremy Allison jallison at whistle.com
Tue Feb 24 18:42:13 GMT 1998


Jeremy Allison wrote:
> 
> Well the code that prints out that error message is getting
> the IP address directly from the recvfrom() call in util.c
> that gets the incoming udp packet. Do you have a network
> sniffer that can see if the source address really is getting
> set to the local broadcast address (and also this would allow
> you to get the MAC address of the sender to track it down) ?
> 

Well, raining on my own parade here I have (finally) realized
that the code in nmbd_namequery.c that prints out second message 
IP source address is wrong :-(. It will always print out the
IP address the query was sent to - which of course is the
subnet broadcast address. Argggghhhhh.

To fix this (and find out where the second reply really
came from) apply the following patch (now in the master
sources). Sorry for that bug.

The message from Matt JD Aldridge <matthew.aldridge at nexor.co.uk>
that said :

> I noticed this problem on a Solaris machine which had a network interface (le0:1) as well as a 
> physical (le0), where both IP addresses were in the same subnet.  No matter how I tried to 
> configure samba, the only way I could stop this was to take down the second IP address.
> Is there any way to stop broadcast reception on an interface either in the Solaris or the 
> Samba config?

Was what gave it away (thanks Matt). I'll try and think about
how to filter out a second response if coming in on another
interface onto the same net.

Jeremy Allison,
Samba Team.

--------------------patch follows-----------------------------

*** nmbd_namequery.c.orig       Tue Feb 24 10:37:12 1998
--- nmbd_namequery.c    Tue Feb 24 10:37:41 1998
***************
*** 91,97 ****
      DEBUG(0,("query_name_response: Multiple (%d) responses received
for a query on \
  subnet %s for name %s. This response was from IP %s\n", 
          rrec->num_msgs, subrec->subnet_name, namestr(question_name), 
!         inet_ntoa(rrec->packet->ip) ));
  
      /* We have already called the success or fail function, so we
         don't call again here. Leave the response record around in
--- 91,97 ----
      DEBUG(0,("query_name_response: Multiple (%d) responses received
for a query on \
  subnet %s for name %s. This response was from IP %s\n", 
          rrec->num_msgs, subrec->subnet_name, namestr(question_name), 
!         inet_ntoa(p->ip) ));
  
      /* We have already called the success or fail function, so we
         don't call again here. Leave the response record around in
----------------end of patch---------------------------------

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba mailing list