fix: arping check

master
kvaps 2017-12-22 18:18:42 +01:00
parent 6381ed0eb1
commit 6e0344cd23
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ unused_gateway() {
UNUSED_GATEWAY="$(random_gateway)"
fi
while arping -fD -I "$BRIDGE" -s 0.0.0.0 -c "$(( ( RANDOM % 8 ) + 2 ))" "$UNUSED_GATEWAY" 1>/dev/null; do
while (arping -fD -I "$BRIDGE" -s 0.0.0.0 -c "$(( ( RANDOM % 8 ) + 2 ))" "$UNUSED_GATEWAY" | grep -q 'reply from'); do
local UNUSED_GATEWAY="$(random_gateway)"
done
echo "$UNUSED_GATEWAY"