From 0db6e54beae7d83aa5059320c3ccb6e63dba85c1 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 7 Mar 2017 14:20:10 +0100 Subject: [PATCH] TT#10833 bin/check.sh: use netstat (-a) when checking for used ports * for mports RTP filter UDP only (-u) Change-Id: Ie660beb490369cf9096a2118b268a2cb77a13b5c --- bin/check.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/check.sh b/bin/check.sh index 01917028..791b219a 100755 --- a/bin/check.sh +++ b/bin/check.sh @@ -269,7 +269,7 @@ function check_port local step=${2:-1} until [ $status -eq 1 ]; do - if netstat -n | grep -q ":$port " ; then + if netstat -an | grep -q ":$port " ; then port=$((port + step)) else status=1 @@ -287,9 +287,9 @@ function check_mport local step=${2:-3} local mport2 until [ $status -eq 1 ]; do - if ! (netstat -n | grep -q ":${mport} ") ; then + if ! (netstat -aun | grep -q ":${mport} ") ; then mport2=$((mport + 2)) - if ! (netstat -n | grep -q ":${mport2} "); then + if ! (netstat -aun | grep -q ":${mport2} "); then status=1 fi fi