Send pings only if the VM has been found, and do it in background (because python slowlyness)

This commit is contained in:
Alarig Le Lay 2019-01-24 21:13:13 +01:00
parent 8d57a2354d
commit 6f2b9b9375

View file

@ -241,14 +241,14 @@ for ID_RANGE_V6 in ${ID_RANGES_V6}; do
fi
GW_IPv6="fe80::204:92:100:1"
# Send ICMP to update ARP/NDP cache
send-icmp.py ${MAC} ${IFACE} ${VM_IPV4} ${GW_IPv4} ${VM_NH} ${GW_IPv6} &
else
# En cas d'echec, on continue de parcourir les autres RANGES
echo "Valeur vide ou ne correspond pas à un range IPV6"
fi
done
# Send ICMP to update ARP/NDP cache
send-icmp.py ${MAC} ${IFACE} ${VM_IPV4} ${GW_IPv4} ${VM_NH} ${GW_IPv6}
write_log INFO 'Script ended'
exit 0