Re: receiving broadcasts from host zero in a subnet?
Jens-Uwe Mager (email@example.com)
Wed, 20 Oct 1999 21:47:05 +0200
On Wed, Oct 20, 1999 at 03:30:18PM +0200, Andi Kleen wrote:
> On Wed, Oct 20, 1999 at 03:12:45PM +0200, Jens-Uwe Mager wrote:
> > On Wed, Oct 20, 1999 at 04:53:55AM +0200, Andi Kleen wrote:
> > > firstname.lastname@example.org (Jens-Uwe Mager) writes:
> > >
> > > > I am attempting port a program to linux that listens to broadcast UDP
> > > > packets from a particular device while performing a network boot. This
> > > > UDP broadcast is received OK if it is from the all zeroes 0.0.0.0 address
> > > > to the all ones broadcast address. But if the packet is from for example
> > > > 192.168.1.0 to 192.168.1.255 (with subnet mask 255.255.255.0) the packet
> > > > does not appear to be received on an UDP socket bound to INADDR_ANY. The
> > > > device in questions its subnet but not its IP address so it uses this
> > > > peculiar broadcast. Is there any special rule I need to enable to receive
> > > > these kind of broadcasts?
> > >
> > > SO_BROADCAST, as documented in socket(7).
> > This option is already turned on, otherwise I would not have been able
> > to send broadcast packets.
> You need correct routing tables so that Linux knows that 192.168.1.255
> is a broadcast.
The 192.168.1.255 address is already the broadcast address as per my
subnet mask, do I need a routing table entry even then? The situation
is as follows:
my Linux servers address: 192.168.1.1
Device is using address: 192.168.1.0
Device sends link broadcast to: 192.168.1.255
Jens-Uwe Mager <pgp-mailto:62CFDB25>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/