projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ff01db
)
tcp: Add a TCP_FASTOPEN socket option to get a max backlog on its listner
author
Kenjiro Nakayama
<
[email protected]
>
Wed, 16 Apr 2014 16:25:01 +0000
(
01:25
+0900)
committer
David S. Miller
<
[email protected]
>
Sun, 20 Apr 2014 22:18:54 +0000
(18:18 -0400)
This patch adds a TCP_FASTOPEN socket option to get a max backlog on its
listener to getsockopt().
Signed-off-by: Kenjiro Nakayama <
[email protected]
>
Acked-by: Neal Cardwell <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/tcp.c
patch
|
blob
|
history
diff --git
a/net/ipv4/tcp.c
b/net/ipv4/tcp.c
index 4bd6d52eeffb6c7ddc3e98054a7070826a4c4dcd..eb1dde37e678f6bb1570bfb452c019b88eb1a76c 100644
(file)
--- a/
net/ipv4/tcp.c
+++ b/
net/ipv4/tcp.c
@@
-2916,6
+2916,14
@@
static int do_tcp_getsockopt(struct sock *sk, int level,
case TCP_USER_TIMEOUT:
val = jiffies_to_msecs(icsk->icsk_user_timeout);
break;
+
+ case TCP_FASTOPEN:
+ if (icsk->icsk_accept_queue.fastopenq != NULL)
+ val = icsk->icsk_accept_queue.fastopenq->max_qlen;
+ else
+ val = 0;
+ break;
+
case TCP_TIMESTAMP:
val = tcp_time_stamp + tp->tsoffset;
break;