lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1513348062-15968-1-git-send-email-mrv@mojatatu.com>
Date:   Fri, 15 Dec 2017 09:27:42 -0500
From:   Roman Mashak <mrv@...atatu.com>
To:     stephen@...workplumber.org
Cc:     netdev@...r.kernel.org, jhs@...atatu.com,
        Roman Mashak <mrv@...atatu.com>
Subject: [PATCH v3 iproute2 1/1] ss: add missing path MTU parameter

v3:
   Rebase and use out() instead of printf().
v2:
   Print the path MTU immediately after the MSS, as it is easier to parse
   for humans (suggested by Neal Cardwell).

Signed-off-by: Roman Mashak <mrv@...atatu.com>
---
 man/man8/ss.8 | 4 ++++
 misc/ss.c     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/man/man8/ss.8 b/man/man8/ss.8
index 6d06383..0d52673 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -184,6 +184,10 @@ max segment size
 congestion window size
 .P
 .TP
+.B pmtu:<pmtu>
+path MTU value
+.P
+.TP
 .B ssthresh:<ssthresh>
 tcp congestion window slow start threshold
 .P
diff --git a/misc/ss.c b/misc/ss.c
index 9d21ed7..1abf43d 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -790,6 +790,7 @@ struct tcpstat {
 	int		    mss;
 	int		    rcv_mss;
 	int		    advmss;
+	unsigned int	    pmtu;
 	unsigned int	    cwnd;
 	unsigned int	    lastsnd;
 	unsigned int	    lastrcv;
@@ -2360,6 +2361,8 @@ static void tcp_stats_print(struct tcpstat *s)
 
 	if (s->mss)
 		out(" mss:%d", s->mss);
+	if (s->pmtu)
+		out(" pmtu:%u", s->pmtu);
 	if (s->rcv_mss)
 		out(" rcvmss:%d", s->rcv_mss);
 	if (s->advmss)
@@ -2707,6 +2710,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
 		s.reordering	 = info->tcpi_reordering;
 		s.rcv_ssthresh   = info->tcpi_rcv_ssthresh;
 		s.cwnd		 = info->tcpi_snd_cwnd;
+		s.pmtu		 = info->tcpi_pmtu;
 
 		if (info->tcpi_snd_ssthresh < 0xFFFF)
 			s.ssthresh = info->tcpi_snd_ssthresh;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ