diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-06-23 12:21:28 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-23 12:21:28 -0700 |
commit | 056ede6cface66b400cd3b8e60ed077cc5b85c18 (patch) | |
tree | cb9ac506ae90158a804f8998d3e3907bc7d487ce /net | |
parent | 7c99c909fa69a183c1b80bd64fb9f0d11459aff3 (diff) | |
download | kernel_samsung_smdk4412-056ede6cface66b400cd3b8e60ed077cc5b85c18.zip kernel_samsung_smdk4412-056ede6cface66b400cd3b8e60ed077cc5b85c18.tar.gz kernel_samsung_smdk4412-056ede6cface66b400cd3b8e60ed077cc5b85c18.tar.bz2 |
[TCP]: Report congestion control algorithm in tcp_diag.
Enhancement to the tcp_diag interface used by the iproute2 ss command
to report the tcp congestion control being used by a socket.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_diag.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c index a4e5120..f66945c 100644 --- a/net/ipv4/tcp_diag.c +++ b/net/ipv4/tcp_diag.c @@ -65,6 +65,11 @@ static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, if (ext & (1<<(TCPDIAG_INFO-1))) info = TCPDIAG_PUT(skb, TCPDIAG_INFO, sizeof(*info)); + if (ext & (1<<(TCPDIAG_CONG-1))) { + size_t len = strlen(tp->ca_ops->name); + strcpy(TCPDIAG_PUT(skb, TCPDIAG_CONG, len+1), + tp->ca_ops->name); + } } r->tcpdiag_family = sk->sk_family; r->tcpdiag_state = sk->sk_state; |