[lkml]   [2000]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Fw: Local Denial-of-Service attack against Linux

> But IMHO
> * getsockopt(SNDBUF) should return 1/2 sk->sndbuf.
> * sk->sndbuf should be initialized to 2*wmem_default.

You missed one thing: sk->sndbuf is a real value with well defined
semantics. And the argument passed to SO_SNDBUF is a hint,
there is no direct connection between them.
All this mess with SO_*BUF is origined not in linux, essentially
SO_*BUF is simply broken from the very beginning and was misused
for years. F.e. setting sndbuf of 10 bytes on udp socket, bsd
allows to send packet with payload of 10 bytes, not depending how
much overhead is involved. Essentially, such sndbuf is fully useless.

So, we choose the following scheme:

setsockopt() produces some sk->sndbuf from hint given by user.
User need not know anything about algorithm used by kernel.
However, user wants to know what sk->sndbuf is really selected and
does this with getsockopt(). Well, you could design whole array
of socket options to control this engine more transparently and emulating
BSD more closely, but you should remember that nobody needed
this until now.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:57    [W:0.029 / U:33.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site