From 2fff79df2aa51e67134425461a85fe67aaead8d0 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Thu, 27 Feb 2020 10:05:50 +0100 Subject: [PATCH] added support for older versions of 'ss' in 'netstat.pm' #271 --- lib/netstat.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/netstat.pm b/lib/netstat.pm index beca12e..8fdb871 100644 --- a/lib/netstat.pm +++ b/lib/netstat.pm @@ -181,7 +181,7 @@ sub netstat_update { if($config->{os} eq "Linux") { my $cmd = $config->{netstat}->{cmd} || ""; if(!$cmd || $cmd eq "ss") { - if(open(IN, "ss -na -f inet |")) { + if(open(IN, "ss -naut -f inet |")) { while() { m/^(\S+)\s+(\S+)/; my $proto = $1 || ''; @@ -205,7 +205,7 @@ sub netstat_update { } close(IN); } - if(open(IN, "ss -na -f inet6 |")) { + if(open(IN, "ss -naut -f inet6 |")) { while() { m/^(\S+)\s+(\S+)/; my $proto = $1 || '';