Problem receiving UDP broadcast packets.
Grant Edwards
invalid at invalid.invalid
Tue Apr 19 19:54:38 EDT 2011
On 2011-04-19, Irmen de Jong <irmen.NOSPAM at xs4all.nl> wrote:
> On 20-4-2011 1:21, Grant Edwards wrote:
>>
>> If I don't call bind(), then the broadcast packets go out the wrong
>> interface on the sending machine.
>
> Fair enough.
>
> Next issue then: as far as I know, broadcast packets are by default
> not routed across subnets by gateways. Which is a good thing.
>
> That would explain why your receiver doesn't see the packets unless
> its interface IP address is in the same subnet as the sender's.
>
> However it doesn't explain (for me) why the tcpdump program running
> on that same receiver machine still happily spits out received
> packets.
The two machines are on the same Ethernet segment (they're connected
via a dumb Ethernet switch).
Tcpdump shows the packets because the packets are being received by
the receiving machine's Ethernet interface. They have a destination
MAC of ff:ff:ff:ff:ff:ff, so everybody on the logical Ethernet segment
receives them.
I guess the problem is that I expected to receive a packet on an
interface anytime a packet was received with a destination IP address
that matched that of the the interface. Apprently there's some
filtering in the network stack based on the _source_ address as well
(that seems very counter-intuitive to me).
--
Grant Edwards grant.b.edwards Yow! I'm not an Iranian!!
at I voted for Dianne
gmail.com Feinstein!!
More information about the Python-list
mailing list