On Mon, Jul 05, 2004 at 02:59:43PM +0200, G�rard Gu�vel wrote:
> 
> Hi,
> 
> I use a samba 3.0.2a server on a Linux Mandrake 10.0.
> This morning, I found the nmb daemon shut down
> with the following message in the nmbd log file :
> [2004/07/03 20:39:53, 0] nmbd/nmbd.c:reload_interfaces(263)
> reload_interfaces: No subnets to listen to. Shutting down...
> 
> Over the web, I found many questions about this problem but no real answer.
> 
> Any idea or precision about this. It is a real problem to loose the shares
> and to wait for the administrator to restart smb.

Here is the fix  for this that will be in 3.0.5pre2. Sorry for the bug.

Jeremy.
Modified: branches/SAMBA_3_0/source/lib/interface.c
===================================================================
--- branches/SAMBA_3_0/source/lib/interface.c   2004-06-24 21:35:16 UTC (rev 1247)
+++ branches/SAMBA_3_0/source/lib/interface.c   2004-06-24 23:27:00 UTC (rev 1248)
@@ -94,7 +94,7 @@
 4) ip/mask
 5) bcast/mask
 ****************************************************************************/
-static void interpret_interface(const char *token)
+static void interpret_interface(char *token)
 {
        struct in_addr ip, nmask;
        char *p;
@@ -130,9 +130,9 @@
        }
 
        /* parse it into an IP address/netmasklength pair */
-       *p++ = 0;
-
+       *p = 0;
        ip = *interpret_addr2(token);
+       *p++ = '/';
 
        if (strlen(p) > 2) {
                nmask = *interpret_addr2(p);
@@ -207,7 +207,11 @@
 
        if (ptr) {
                while (*ptr) {
-                       interpret_interface(*ptr);
+                       char *ptr_cpy = strdup(*ptr);
+                       if (ptr_cpy) {
+                               interpret_interface(ptr_cpy);
+                               free(ptr_cpy);
+                       }
                        ptr++;
                }
        }

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to