All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] ipv4: Add option to get TCP_FASTOPEN to getsockopt()
Date: Tue, 15 Apr 2014 02:39:31 +0900	[thread overview]
Message-ID: <87tx9v3j58.fsf@gmail.com> (raw)

TCP_FASTOPEN option can be set via setsockopt(), but the value cannot be
gotten via getsockopt(). This patch adds the option to getsockopt().

Sighned-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>

 	Add option to get TCP_FASTOPEN to getsockopt()
---
 net/ipv4/tcp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4bd6d52..6ccdbcc 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2916,6 +2916,11 @@ 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:
+		val = sysctl_tcp_fastopen;
+		break;
+
 	case TCP_TIMESTAMP:
 		val = tcp_time_stamp + tp->tsoffset;
 		break;
--
1.9.0

             reply	other threads:[~2014-04-14 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 17:39 Kenjiro Nakayama [this message]
2014-04-15  0:43 ` [PATCH] ipv4: Add option to get TCP_FASTOPEN to getsockopt() Neal Cardwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tx9v3j58.fsf@gmail.com \
    --to=nakayamakenjiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.