[lkml]   [2009]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: When does Linux drop UDP packets?
On Thu, Jun 04, 2009 at 04:53:47PM +0200, Philipp Reh wrote:
> 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 and the
> client in The server uses its real IP as the packet's
> sender ip (

You don't say what the client IP is. Let's assume that it is
for simplicity.

> 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).

Are you saying that the server sent to with source ip of and the client did not see it?

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

Again, what was the destination IP address?

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

So the only thing you change is the sender address?

What tools are you using to read the packets, and how do you know it is

-- Steve

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

 \ /
  Last update: 2009-06-04 18:01    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean