[Spread-users] Bug in Spread for Windows?
Jonathan Stanton
jonathan at cnds.jhu.edu
Fri Nov 17 14:08:59 EST 2006
A fix for this (to not do the bind to broadcast on windows) was committed to spread 4
today and will be in the upcoming release.
Jonathan
On Tue, Nov 14, 2006 at 11:40:18AM -0500, Jonathan Stanton wrote:
> Thanks for the detail, we'll try your configuration on our windows box to
> duplicate it. We may not have used the interface specifications on windows before
> (just using the default IN_ADDR_ANY bind) so that might be why we didn't see it.
>
> I did read through the MSDN winsock docs last night and couldn't find anything
> about special handling of broadcast binds -- can you point me at something that
> explains this difference with BSD/sockets? (MSDN had a really nice page listing
> the differences that require some adaption like the error handling and
> closesocket, but I didn't see this one on that page).
>
> Thanks,
>
> Jonathan
>
> On Tue, Nov 14, 2006 at 04:03:22PM +0200, Michael Chelnokov wrote:
> > Hello Jonathan,
> >
> > Thanks for your response.
> >
> > As per spread.conf, I have to specify interfaces for the hosts.
> > I tried two different environments:
> >
> > 1. Computers with Windows XP SP2 and one network interface each, one subnet
> > (192.168.0.0/24):
> >
> > Spread_Segment 192.168.0.255:2345 {
> >
> > computer_11 192.168.0.11 {
> > D 192.168.0.11
> > C 127.0.0.1 }
> >
> > computer_12 192.168.0.12 {
> > D 192.168.0.12
> > C 127.0.0.1 }
> >
> > }
> >
> > 2. Servers with Windows 2003 Standard Edition SP1 and two network
> > interfaces each, two private networks (192.168.11.0/24 and 192.168.12.0/24)
> > and two "public" networks (192.168.21.0/24 <- router -> 192.168.22.0/24):
> >
> > Spread_Segment 192.168.11.255:2345 {
> >
> > server_11 192.168.21.11 {
> > D 192.168.21.11
> > D 192.168.11.11
> > C 127.0.0.1 }
> >
> > server_12 192.168.21.12 {
> > D 192.168.21.12
> > D 192.168.11.12
> > C 127.0.0.1 }
> >
> > }
> >
> > Spread_Segment 192.168.12.255:2345 {
> >
> > server_13 192.168.22.13 {
> > D 192.168.22.13
> > D 192.168.12.13
> > C 127.0.0.1 }
> >
> > server_14 192.168.22.14 {
> > D 192.168.22.14
> > D 192.168.12.14
> > C 127.0.0.1 }
> >
> > }
> >
> > In both cases the Spread daemon can not start because it tries to bind to a
> > broadcast address.
> > I have tried the following binaries:
> > - Spread 3.17.3 binaries from spread.org;
> > - Spread 4.0.0rc2 built from sources by Visual Studio 2005 and with
> > recommendations from Win32BuildInstructions.pdf
> >
> > I sure UDP broadcast packets normally work, I have tested them. Windows
> > does not replies to broadcast ping, but anyway, broadcast packets work both
> > with my simple test program and with patched Spread :-)
> > I just disabled call to DL_init_channel( RECV_CHANNEL, My.port,
> > Bcast_address, Bcast_address ) in Net_init() and Spread is working fine.
> >
> > In UNIX, a socket has to be bound to a broadcast address in order to
> > receive broadcast packets, it doesn't receive broadcast packets on a socket
> > bound to a regular address. I.e. it is needed to bind two sockets to two
> > addresses (192.168.0.255 and 192.168.0.11 in my 1st configuration for
> > server_11).
> > In Windows, a socket can not be bound to a broadcast address, but a socket
> > bound to a regular address will receive broadcast packets. I.e. it is
> > enough to bind one socket to one address (192.168.0.11 in my 1st
> > configuration for server_11) to receive both unicast and broadcast packets.
> > A call to bind to 192.168.0.255 fails with error WSAEADDRNOTAVAIL.
> >
> > Best regards,
> > Michael Chelnokov.
> >
> > ----- Original Message -----
> > From: "Jonathan Stanton" <jonathan at cnds.jhu.edu>
> > To: "Michael Chelnokov" <michelnok at mail.ru>
> > Cc: <spread-users at lists.spread.org>
> > Sent: Tuesday, November 14, 2006 11:00 AM
> > Subject: Re: [Spread-users] Bug in Spread for Windows?
> >
> >
> > >Hello,
> > >
> > >I have not seen this problem before and we do use windows occasionally, so
> > >it
> > >should work.
> > >
> > >In your spread.conf file, did you configure any specific interfaces for
> > >the hosts
> > >in your Spread_segment? Or did you just list one IP for each machine? (The
> > >reason
> > >I ask is that if you specify specific interfaces, that causes the binds to
> > >be done
> > >differently)
> > >
> > >Are you sure that broadcast packets normally work on your machine (you can
> > >ping the
> > >broadcast address for your network and get replies from many other
> > >machines)? You
> > >can also replace the broadcast address in spread.conf with an IP multicast
> > >address
> > >and try that. Let us know if that works while broadcast doesn't.
> > >
> > >If you can also let us know exactly what version of windows you are using
> > >and how
> > >you built spread (or where you got the binaries)
> > >
> > >Thanks,
> > >
> > >Jonathan
> >
>
> --
> -------------------------------------------------------
> Jonathan R. Stanton jonathan at cs.jhu.edu
> Dept. of Computer Science
> Johns Hopkins University
> -------------------------------------------------------
>
> _______________________________________________
> 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
-------------------------------------------------------
More information about the Spread-users
mailing list