From root@tecdigital.net  Sat Dec 22 01:03:02 2001
Return-Path: <root@tecdigital.net>
Received: from mail.tecdigital.net (tecdigital.tol.itesm.mx [132.254.97.16])
	by hub.freebsd.org (Postfix) with ESMTP id 4AF3F37B41B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 22 Dec 2001 01:03:02 -0800 (PST)
Received: by mail.tecdigital.net (Postfix, from userid 0)
	id 97DA31D71; Sat, 22 Dec 2001 03:02:46 -0600 (CST)
Message-Id: <20011222090246.97DA31D71@mail.tecdigital.net>
Date: Sat, 22 Dec 2001 03:02:46 -0600 (CST)
From: Mario Doria <madd@tecdigital.net>
Reply-To: Mario Doria <madd@tecdigital.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Samba's NMBD cannot find alias interface 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         33085
>Category:       kern
>Synopsis:       Samba's NMBD cannot find alias interface
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    jlemon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 22 01:10:00 PST 2001
>Closed-Date:    Fri Sep 03 04:28:38 GMT 2004
>Last-Modified:  Fri Sep 03 04:28:38 GMT 2004
>Originator:     Mario Doria
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD sdf-1.tecdigital.net 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: Sat Dec 22 02:37:10 CST 2001 madd@sdf-1.tecdigital.net:/usr/obj/usr/src/sys/SDF-1 i386


	
>Description:
	With samba built from ports, version 2.2.2, NMBD dumps core when a client
	machine connects on an alias IP address.


>How-To-Repeat:
	Create an alias interface ona  machine (let's say original IP addy is 10.25.1.1)
	and the alias IP is 10.25.1.2. On this machine setup a wins server with samba.
	On another machine, using smbclient (or a windoze machine) try to connect to any 
	share on the server system. The following error ocurrs:
	
	wins_srv_died(): WINS server 10.25.1.2 appears to be down.
	Connection to server failed

	This problem happens only after using sources CVSuped on the 15 of 
	december 2001. Using sources from december 14 eliminates the problem.
>Fix:
>Release-Note:
>Audit-Trail:

From: "Mario Doria" <madd@tecdigital.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <madd@tecdigital.net>
Cc:  
Subject: Re: kern/33085: Samba's NMBD cannot find alias interface
Date: Sat, 22 Dec 2001 03:35:34 -0600

 Here's some gdb output:
 
 Complete nmbd.core is at http://www.tecdigital.net/madd/nmbd.core
 
 sdf-1# gdb -e /usr/local/sbin/nmbd -c nmbd.core
 GNU gdb 4.18
 Copyright 1998 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i386-unknown-freebsd".
 Core was generated by `nmbd'.
 Program terminated with signal 5, Trace/BPT trap.
 Reading symbols from /usr/lib/libpam.so.1...(no debugging symbols found)...
 done.
 Reading symbols from /usr/lib/libc.so.4...(no debugging symbols
 found)...done.
 Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols
 found)...
 done.
 #0  0x804b4ff in ?? ()
 
 

From: "Mario Doria" <madd@tecdigital.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <madd@tecdigital.net>
Cc:  
Subject: Re: kern/33085: Samba's NMBD cannot find alias interface
Date: Sun, 23 Dec 2001 19:23:35 -0600

 Fix/Workaround:
 
 More information:
 
 The machine's ifconfig output:
 sdf-1# ifconfig
 fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
         ether 00:b0:d0:aa:82:cf
         media: Ethernet autoselect (none)
         status: no carrier
 fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         inet 10.25.165.1 netmask 0xffffff00 broadcast 10.25.165.255
         inet 10.25.165.2 netmask 0xffffffff broadcast 10.25.165.2
         inet 10.25.165.3 netmask 0xffffffff broadcast 10.25.165.3
         ether 00:02:b3:1b:49:71
         media: Ethernet autoselect (100baseTX)
         status: active
 xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
         options=3<rxcsum,txcsum>
         ether 00:01:02:ed:26:dc
         media: Ethernet autoselect (100baseTX)
         status: active
 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
         inet 127.0.0.1 netmask 0xff000000
 
 On interface fxp1, there are three IP addresses assigned. nmbd is to work on
 10.25.165.3.
 
 If I add the line:
 interfaces = 127.0.0.1/24 10.25.165.3/24
 
 to smb.conf, the problem is sorted out.
 It broke on december 14, at 20:00:00 UTC.  The files that were changed
 between december 14 @ 19:00:00 and december 14 @ 20:00:00 where:
 (I don't know how these work in the system, what I know is that if I use
 sources from december 14 @ 19:00:00, samba's nmbd will work fine. Afterwards
 its all funny. The following files where the ones changing between those two
 hours):
 
 Edit src/sys/dev/bge/if_bge.c
  Edit src/sys/dev/gx/if_gx.c
  Edit src/sys/dev/lge/if_lge.c
  Edit src/sys/dev/nge/if_nge.c
  Edit src/sys/dev/txp/if_txp.c
  Edit src/sys/kern/kern_descrip.c
  Edit src/sys/kern/kern_event.c
  Edit src/sys/net/if.c
  Edit src/sys/net/if.h
  Edit src/sys/net/if_ethersubr.c
  Edit src/sys/net/if_var.h
  Edit src/sys/netinet/in.c
  Edit src/sys/netinet/in.h
  Edit src/sys/netinet/tcp_syncache.c
  Edit src/sys/pci/if_ti.c
  Edit src/sys/pci/if_xl.c
  Edit src/sys/sys/event.h
  Edit src/sys/sys/sockio.h
  Edit src/sys/vm/vm_zone.c
 

From: "Mario Doria" <madd@tecdigital.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <madd@tecdigital.net>
Cc:  
Subject: Re: kern/33085: Samba's NMBD cannot find alias interface
Date: Mon, 24 Dec 2001 04:37:48 -0600

 It seems that with recent changes, nmbd now notices that the broadcast
 address of an alias interface is the same address as the alias interface.
 Before december 14, it did not matter. For now, nmbd needs to be told in
 which IP address to listen (if it's a alias IP address) and also add the
 netmask accordingly.
 
 Example, with a machine with ip address 10.0.0.1, and two alias addresses
 (10.0.0.2 and 10.0.0.3), to make nmbd use IP 10.0.0.3, the line "interfaces
 = 127.0.0.1 10.0.0.3/24" will make it work.
 
 
 Thanks!
 
Responsible-Changed-From-To: freebsd-bugs->jlemon 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Sun Dec 30 07:19:43 PST 2001 
Responsible-Changed-Why:  
The only change made to the source files listed during the period 
given was Jonathan's merge of interface capabilities support. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33085 

From: Sheldon Hearn <sheldonh@starjuice.net>
To: Mario Doria <madd@tecdigital.net>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/33085: Samba's NMBD cannot find alias interface 
Date: Sun, 30 Dec 2001 17:24:31 +0200

 On Sat, 22 Dec 2001 03:02:46 CST, Mario Doria wrote:
 
 > 	With samba built from ports, version 2.2.2, NMBD dumps core when a
 >	client machine connects on an alias IP address.
 
 Interestingly enough, this isn't 100% reproducible in -CURRENT.  It only
 happens about 50% of the time.
 
 Ciao,
 Sheldon.

From: "Mario Doria" <madd@tecdigital.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <madd@tecdigital.net>
Cc:  
Subject: Re: kern/33085: Samba's NMBD cannot find alias interface
Date: Sun, 6 Jan 2002 02:10:39 -0600

 >    Interestingly enough, this isn't 100% reproducible in -CURRENT.  It
 only
  >    happens about 50% of the time.
 
 I found an error to be reproducible 100% of the time. As you said, also
 in -STABLE happens, 50% of the time it dumps core, 50% it doesnt (more or
 less). But, 100% of the time, when using an alias address to server nmbd
 requests, nmbd stopped responding and the smbclient would report that the
 wins server died.
 
 Maybe a note when installing the port, or maybe my setup was a bit out of
 the ordinary. I wrote to the samba mailing list and they asked for my core
 dumps, but no answer so far.
 
 Thanks,
 
 
 Mario Doria
 madd@tecdigital.net
 

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <madd@tecdigital.net>
Cc:  
Subject: Re: kern/33085: Samba's NMBD cannot find alias interface
Date: Mon, 24 Jun 2002 09:14:10 -0500

 I think this was fixed, could you verify the problem exists on samba 2.2.5?
 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Fri Sep 3 04:28:23 GMT 2004 
State-Changed-Why:  
Feedback timeout (>1 year). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=33085 
>Unformatted:
