• Eric B Munson's avatar
    tcp: Return error instead of partial read for saved syn headers · aea0929e
    Eric B Munson authored
    Currently the getsockopt() requesting the cached contents of the syn
    packet headers will fail silently if the caller uses a buffer that is
    too small to contain the requested data.  Rather than fail silently and
    discard the headers, getsockopt() should return an error and report the
    required size to hold the data.
    Signed-off-by: default avatarEric B Munson <emunson@akamai.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
    Cc: James Morris <jmorris@namei.org>
    Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
    Cc: Patrick McHardy <kaber@trash.net>
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    aea0929e
tcp.c 81.6 KB