]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Return error instead of partial read for saved syn headers
authorEric B Munson <emunson@akamai.com>
Mon, 18 May 2015 18:35:58 +0000 (14:35 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 May 2015 20:33:34 +0000 (16:33 -0400)
commit12adf1e0c724c5825aa5e26c4c12750ad661ad41
treedd499751b35707afda3144e78261f710b34671e6
parent4f89f1bf813b60a56d1d42eb46e67e1215af022d
tcp: Return error instead of partial read for saved syn headers

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: Eric 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: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c