Subject: Re: sendto() and ENOBUFS question..
To: David Laight <david@l8s.co.uk>
From: sudog <sudog@sudog.com>
List: tech-net
Date: 05/15/2002 12:20:22
On Wednesday 15 May 2002 11:05, David Laight wrote:
> > >>> If not, how would I, in userland, cleanly wait until I can do another
> > >>> udp_output safely without ENOBUFS showing up?
>
> Fix UDP?
Think if I did something unobtrusive I could get away with a send-pr?
> If I understand what people are saying that UDP allows a single
> (user) application to generate a DoS attack on the system by
> tieing up all the mbufs by getting them queued for output on a
> single interface. Surely there ought to be some back pressure
> flow control back from the ethernet driver to the UDP socket?
I think a DoS would work anyway, since in your version of events, when the
processes are all select()'d and room becomes available in the UDP stream and
they all wake up, all you'd have to do is saturate everything with more data
than the victim application. But then again, this would work with anything,
so I suppose it's not much of a problem.
At any rate, even sending at maximum speed (through ENOBUFS and all) I'm only
getting about half the throughput I can get with a loopback TCP, as it turns
out.
Yikes.
-Marc