Re: Linux recvfrom() broken (was: DNS problems)

David S. Miller (davem@dm.cobaltmicro.com)
Tue, 18 Aug 1998 10:57:49 -0700


Date: Tue, 18 Aug 1998 10:54:15 -0600 (MDT)
From: Dax Kelson <dkelson@inconnect.com>

On Tue, 18 Aug 1998, Paul A Vixie wrote:

> > From: Greg Hudson <ghudson@MIT.EDU>
> >
> > To possibly clear up confusion: under Linux the recvfrom() return
> > value is not limited to the size of the supplied buffer (which has
> > caused some interesting bugs I've had to deal with), but under other
> > systems it is. This situation is consistent with Dan's argument.
>
> then linux is, flatly, broken.

Please give us a specific case, so I can find and fix this.

As far as I can tell, if you pass in a length, we never write more
than that length into your buffer. We truncate packets if your length
is smaller than the packet received, and in the 2.1.x case we'll set
the MSG_TRUNC flag to alert you to this fact. As far as I can tell
this is how POSIX says it should be done.

If things aren't happening this way, show me how and in what way.

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html