[Spread-users] problem using multi homed configuration

Jonathan Stanton jonathan at cnds.jhu.edu
Tue Jul 15 12:48:47 EDT 2003


I've checked into this and this is a bug in the code. If you configure 2
or more daemon interfaces on one machine the daemon tries to bind to the
broadcast address once for each daemon interface. 

I've attached a patch to the daemon code for the file network.c that
should fix this by only binding to the broadcast address once, no matter
how many 'D' interfaces are configured. 

I did some testing on my local linux box and with the patch it worked
for me, but definitely let us know if you encounter any more problems.

Jonathan

On Tue, Jul 15, 2003 at 06:58:30PM +0300, Orit Wasserman wrote:
> I'm trying to run spread with multi homed host
> my spread.conf is :
> spread_Segment  10.255.255.255:4803 { 
> 		node0	10.48.0.1 {
> 	 			D 10.48.0.1
> 		        D 10.16.0.1
>  				C 127.0.0.1
>  			}		
> 		node1 10.48.0.2 {
>  			D 10.48.0.2
>   			D  10.16.0.2
>   			C 127.0.0.1 
>  			}
> }
> 
> I'm getting the following error :
> p_init: IP access control file not found.
> If you are using IP based access controls, please make sure the file exists.
> Conf_init: using file: /prod/tmp/orit/cdb/myspread.conf
> Successfully configured Segment 0 [10.255.255.255:4803] with 2 procs:
>                        node0: 10.48.0.1
>                        node1: 10.48.0.2
> Finished configuration file.
> Conf_init: My name: node0, id: 10.48.0.1, port: 4803
> DL_init_channel: bind error (98): Address already in use for port 4803, with sockaddr (255.255.255.10: 49938) probably already running
> Exit caused by Alarm(EXIT)
> 
> It seems that spread is try to bind to 10.255.255.255 twice ..
> Orit Wasserman.
> 
> 
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users

-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------
-------------- next part --------------
Index: network.c
===================================================================
RCS file: /storage/cvsroot/spread/daemon/network.c,v
retrieving revision 1.8
diff -u -r1.8 network.c
--- network.c	22 Sep 2002 02:56:52 -0000	1.8
+++ network.c	15 Jul 2003 16:47:58 -0000
@@ -90,6 +90,7 @@
 	proc		dummy_proc;
         int32u          interface_addr;
         int             i;
+        bool            bcast_bound = FALSE;
 
 	Cn = Conf();
 	My = Conf_my();
@@ -125,8 +126,10 @@
                                 interface_addr = 0;
                         else {
                                 interface_addr = My.ifc[i].ip;
-                                if (Bcast_needed) 
+                                if (Bcast_needed && !bcast_bound) {
                                     Bcast_channel[Num_bcast_channels++] = DL_init_channel( RECV_CHANNEL, My.port, Bcast_address, Bcast_address );
+                                    bcast_bound = TRUE;
+                                }
                         }
                         Bcast_channel[Num_bcast_channels++] = DL_init_channel( RECV_CHANNEL, My.port, Bcast_address, interface_addr );
                         Token_channel[Num_token_channels++] = DL_init_channel( RECV_CHANNEL, My.port+1, 0, interface_addr );


More information about the Spread-users mailing list