Problem receiving UDP broadcast packets.

Grant Edwards invalid at invalid.invalid
Wed Apr 20 10:31:41 EDT 2011

On 2011-04-20, Dan Stromberg <drsalists at> wrote:
> On Tue, Apr 19, 2011 at 6:15 PM, Grant Edwards <invalid at invalid.invalid> wrote:
>>> Or can you simply use a stupid netmask like /1 that picks up all the
>>> IP ranges? That way, the source-IP check wouldn't fail.
>> That would require that the device somehow knows that it's not
>> configured correctly and should change the netmask to /1. ?The device
>> doesn't have any way to know that, and it must respond to the
>> discovery commands both before and after it's properly configured.
> - Actually, you Might be able to configure your device to have a
> netmask of, IP address of and broadcast of
> - I've seen something a bit similar used for detecting IP address
> conflicts automatically.
> - A network guru I used to work with told me that you could configure
> a machine with a broadcast of more simply than messing
> around with the netmask, while still achieving the same result for
> general purpose networking.

I'll look into that.

>> I've reread the protocol documentation and noticed that the device has
>> to respond not only to broadcasts to but also to
>> subnet broadcasts send to subnets it's not on. ?That pretty much
>> clinches the requirement to use a raw socket. :/
> With a netmask of, I suspect you will receive all broadcasts
> on the wire, given appropriate listening code.

That might be an option as well, as long as it doesn't disrupt normal
operation of the interface.

Grant Edwards               grant.b.edwards        Yow! Remember, in 2039,
                                  at               MOUSSE & PASTA will
                                be available ONLY by

More information about the Python-list mailing list