Skip to contentSkip to conversation

tcp_diag: Report max ack backlog as separate nla

PATCH In review Pavel Emelyanov 2 participants 2 messages Dec 28, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/5 tcp_diag: Report max ack backlog as separate nla

Since it's thrown away from the core message let's nonetheless report it.

---
 include/linux/inet_diag.h |    1 +
 net/ipv4/inet_diag.c      |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
include/linux/inet_diag.h +1 -0
index d274712..4cdbfe9 100644
@@ -108,6 +108,7 @@ enum {
 	INET_DIAG_CONG,
 	INET_DIAG_TOS,
 	INET_DIAG_TCLASS,
+	INET_DIAG_MAX_ACK_BACKLOG,
 };
 
 #define INET_DIAG_MAX INET_DIAG_TCLASS
net/ipv4/inet_diag.c +4 -0
index 91f9092..8cef079 100644
@@ -109,6 +109,10 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
 	r->id.idiag_src[0] = inet->inet_rcv_saddr;
 	r->id.idiag_dst[0] = inet->inet_daddr;
 
+	if (ext & (1 << (INET_DIAG_MAX_ACK_BACKLOG - 1)))
+		RTA_PUT_U8(skb, INET_DIAG_MAX_ACK_BACKLOG,
+				sk->sk_max_ack_backlog);
+
 	/* IPv6 dual-stack sockets use inet->tos for IPv4 connections,
 	 * hence this needs to be included regardless of socket family.
 	 */
Signature · 1 line
1.5.5.6