From: Pavel Emelyanov <xemul@parallels.com>
To: Linux Netdev List <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>
Subject: [PATCH 5/6] tcp: Report mss_clamp with TCP_MAXSEG option in repair mode
Date: Thu, 19 Apr 2012 17:41:32 +0400 [thread overview]
Message-ID: <4F90160C.1070605@parallels.com> (raw)
In-Reply-To: <4F901572.4040009@parallels.com>
The mss_clamp is the only connection-time negotiated option which
cannot be obtained from the user space. Make the TCP_MAXSEG sockopt
report one in the repair mode.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
net/ipv4/tcp.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 47e2f49..b4e690d 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2659,6 +2659,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
val = tp->mss_cache;
if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN)))
val = tp->rx_opt.user_mss;
+ if (tp->repair)
+ val = tp->rx_opt.mss_clamp;
break;
case TCP_NODELAY:
val = !!(tp->nonagle&TCP_NAGLE_OFF);
--
1.5.5.6
next prev parent reply other threads:[~2012-04-19 13:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 13:38 [PATCH net-next 0/6] TCP connection repair (v4) Pavel Emelyanov
2012-04-19 13:39 ` [PATCH 1/6] sock: Introduce named constants for sk_reuse Pavel Emelyanov
2012-04-19 13:40 ` [PATCH 2/6] tcp: Move code around Pavel Emelyanov
2012-04-19 13:40 ` [PATCH 3/6] tcp: Initial repair mode Pavel Emelyanov
2012-04-19 13:41 ` [PATCH 4/6] tcp: Repair socket queues Pavel Emelyanov
2012-05-02 11:11 ` Eric Dumazet
2012-05-03 8:59 ` Pavel Emelyanov
2012-05-03 9:08 ` Eric Dumazet
2012-05-03 9:15 ` Pavel Emelyanov
2012-05-03 9:31 ` David Miller
2012-04-19 13:41 ` Pavel Emelyanov [this message]
2012-04-19 13:41 ` [PATCH 6/6] tcp: Repair connection-time negotiated parameters Pavel Emelyanov
2012-04-21 19:53 ` [PATCH net-next 0/6] TCP connection repair (v4) David Miller
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=4F90160C.1070605@parallels.com \
--to=xemul@parallels.com \
--cc=davem@davemloft.net \
--cc=netdev@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.