Skip to content

Commit 260a3a7

Browse files
authored
Merge pull request #225 from andreasstieger/netstat
2.17: correct netstat usage and filtering
2 parents 3d87e6d + c30a43c commit 260a3a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/2_docker_daemon_configuration.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ fi
204204
# 2.17
205205
check_2_17="2.17 - Bind swarm services to a specific host interface"
206206
if docker info 2>/dev/null | grep -e "Swarm:*\sactive\s*" >/dev/null 2>&1; then
207-
netstat -lt | grep -e '\[::]:2377' -e '*:2377' -e '0.0.0.0:2377' >/dev/null 2>&1
207+
netstat -lnt | grep -e '\[::]:2377 ' -e ':::2377' -e '*:2377 ' -e ' 0\.0\.0\.0:2377 ' >/dev/null 2>&1
208208
if [ $? -eq 1 ]; then
209209
pass "$check_2_17"
210210
else

0 commit comments

Comments
 (0)