Re: Strange UDP Issue on 2.6.20.8 - broadcasts not being received if socket bound to local ip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2 May 2007 05:55:28 -0400
"Dylan Taft" <[email protected]> wrote:

> I've been pulling my hair out for the past several hours trying to
> debug a program in wine.  I'm currently on kernel 2.6.20.8.  The
> problem was that I was not getting any broadcasts to 255.255.255.255
> on a UDP socket bound to 192.168.0.8 with SO_BROADCAST enabled.
> 
> I was fiddling around a bit, broadcasts come in fine if the socket is
> bound to INADDR_ANY( 0.0.0.0), but if it's bound to 192.168.0.8
> nothing comes in.  I did a packet sniff, and indeed packets were being
> sent out to 255.255.255.255 via another machine on the network.  I
> wrote a quick test program that would bind a socket to the lan ip and
> wait for incoming data.  I tested it on a windows machine and linux.
> The windows machine could pick up packets fine, my linux machine could
> not.   Is this proper behavior?  It's fudging up several games and
> things in the wine project.
> 
> Does anyone else experience this?  Thanks!

It seems you are expecting too much of SO_BROADCAST option.

http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_10.html

SO_BROADCAST :

Non-zero requests permission to transmit broadcast datagrams (SOCK_DGRAM sockets only).

Note this only handles the transmission of packets, not receiving them.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux