Re: UDP Broadcasts not delivered to IP address

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

 



On Mon, May 14, 2007 at 05:53:32AM -0400, Dylan Taft wrote:
> I just found out, SO_BINDTODEVICE requires root privs.  If I am a
> regular user, and I want to recv a broadcast sent to 255.255.255.255
> on a specific interface, how can this be done?  Binding to 0.0.0.0, it
> seems only broadcasts will come in on whatever if has the default
> route.
> 
> I'm trying to work around the fact that linux will not receive
> broadcasts when binding a socket to an IP other than INADDR_ANY.
> Windows does this, and it's required for the wine project.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Why don't you bind to INADDR_ANY, set the IP_PKTINFO socket option on the socket
in question, and filter based on the ipi_ifindex value in the ancillary messages
that come in with each packet?

Regards
Neil

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux