2.0.7pre2: multihomed_register_name error

Jeremy Allison jeremy at valinux.com
Mon Apr 3 18:09:23 GMT 2000


Giulio Orsero wrote:
> 
> On Thu, 30 Mar 2000 11:38:26 +1000, hai scritto:
> 
> >> interfaces = eth0  127.0.0.1
> >> bind interfaces only = yes
> >> (is there anything wrong in the above lines?)
> >
> >Fixed in CVS. I'm going to release a 2.0.7pre3 to get
> >all these changes tested.
> 
> It seems it's still in pre3:

Ok - here's the patch to pre3 (I was only catching it
in reload_interfaces).

Jeremy.

--------------------cut here---------------------------
Index: nmbd/nmbd_subnetdb.c
===================================================================
RCS file: /data/cvs/samba/source/nmbd/nmbd_subnetdb.c,v
retrieving revision 1.14.2.3.2.2
diff -u -r1.14.2.3.2.2 nmbd_subnetdb.c
--- nmbd_subnetdb.c	1999/09/24 23:42:07	1.14.2.3.2.2
+++ nmbd_subnetdb.c	2000/04/03 17:04:13
@@ -235,6 +235,7 @@
   int num_interfaces = iface_count();
   int i;
   struct in_addr unicast_ip;
+  extern struct in_addr loopback_ip;
 
   if(num_interfaces == 0)
   {
@@ -250,6 +251,17 @@
   for (i = 0 ; i < num_interfaces; i++)
   {
     struct interface *iface = get_interface(i);
+
+    /*
+     * We don't want to add a loopback interface, in case
+     * someone has added 127.0.0.1 for smbd, nmbd needs to
+     * ignore it here. JRA.
+     */
+
+    if (ip_equal(iface->ip, loopback_ip)) {
+      DEBUG(2,("create_subnets: Ignoring loopback interface.\n" ));
+      continue;
+    }
 
     if (!make_normal_subnet(iface)) return False;
   }
--------------------cut here---------------------------

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


More information about the samba mailing list