Commit fc786304 authored by Phil Sutter's avatar Phil Sutter Committed by Pablo Neira Ayuso
Browse files

selftests: netfilter: Avoid hanging ipvs.sh



If the client can't reach the server, the latter remains listening
forever. Kill it after 5s of waiting.

Fixes: 867d2190 ("selftests: netfilter: add ipvs test script")
Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent e306e373
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ cleanup() {
}

server_listen() {
	ip netns exec "$ns2" socat -u -4 TCP-LISTEN:8080,reuseaddr STDOUT > "${outfile}" &
	ip netns exec "$ns2" timeout 5 socat -u -4 TCP-LISTEN:8080,reuseaddr STDOUT > "${outfile}" &
	server_pid=$!
	sleep 0.2
}