public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* When does Linux drop UDP packets?
@ 2009-06-04 14:53 Philipp Reh
  2009-06-04 15:57 ` Steven Rostedt
  2009-06-04 22:03 ` Alexander Clouter
  0 siblings, 2 replies; 21+ messages in thread
From: Philipp Reh @ 2009-06-04 14:53 UTC (permalink / raw)
  To: linux-kernel

Dear list,

I have the following setting in which a client that resides on the same
physical network as a server wants to receive any UDP packet that
arrives on any of its interfaces sent by that server.

The code sets the broadcast flag, calls bind to INADDR_ANY and
uses recvfrom from there on.

Let's say the server resides in the subnet 192.168.6.255 and the
client in 192.168.3.255. The server uses its real IP as the packet's
sender ip (192.168.6.5).

Now the first problem I've encountered is the following:
If the client removes its default route and doesn't have any route
pointing into the subnet the server is in, the packets get discarded
(still tcpdump sees them).

The second problem is that if the server uses the broadcast address as
its sender address (255.255.255.255), the packets get always discarded
(again, tcpdump sees them).

Now if the server fakes its sender address to be in the client's subnet,
every packet arrives again.

So my real question is:
When does Linux discard packets and how can I prevent it from doing
that?

As I'm not yet subscribed to the list, please CC me directly.

Cheers,
Philipp


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-06-25  7:38 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-04 14:53 When does Linux drop UDP packets? Philipp Reh
2009-06-04 15:57 ` Steven Rostedt
     [not found]   ` <20090604161015.GA17303@miyuki>
     [not found]     ` <alpine.DEB.2.00.0906041222450.14994@gandalf.stny.rr.com>
2009-06-04 16:34       ` Steven Rostedt
2009-06-04 16:57         ` Steven Rostedt
2009-06-04 17:46         ` Jaswinder Singh Rajput
2009-06-04 21:07           ` Steven Rostedt
2009-06-04 17:57   ` david
2009-06-04 18:44     ` Eric Dumazet
2009-06-04 18:49       ` david
2009-06-11 23:40   ` Nifty niftylinkern Mitch
2009-06-04 22:03 ` Alexander Clouter
2009-06-04 23:19   ` david
2009-06-05 19:10     ` Alexander Clouter
2009-06-05 19:15       ` david
2009-06-05 19:29         ` Alexander Clouter
2009-06-24  7:47     ` Herbert Xu
2009-06-25  4:32       ` david
2009-06-25  5:00         ` Herbert Xu
2009-06-25  5:37           ` david
2009-06-25  6:13             ` Herbert Xu
2009-06-25  7:38               ` Alexander Clouter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox