Skip to content

Commit

Permalink
tcp: Add a TCP_FASTOPEN socket option to get a max backlog on its lis…
Browse files Browse the repository at this point in the history
…tner

This patch adds a TCP_FASTOPEN socket option to get a max backlog on its
listener to getsockopt().

Signed-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kenjiro Nakayama authored and David S. Miller committed Apr 20, 2014
1 parent 6ff01db commit 1536e28
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1536e28

Please sign in to comment.