Take in account the case of ip neigh add
failure
This commit is contained in:
parent
67de411db8
commit
2216508846
|
@ -176,6 +176,12 @@ for ID_RANGE_V4 in ${ID_RANGES_V4}; do
|
||||||
echo "${COMMAND}"
|
echo "${COMMAND}"
|
||||||
write_log INFO "${COMMAND}"
|
write_log INFO "${COMMAND}"
|
||||||
${COMMAND}
|
${COMMAND}
|
||||||
|
|
||||||
|
# If the previous command fails, it’s because trafic has
|
||||||
|
# already be sent to the VM
|
||||||
|
if [ $? =2 ]; then
|
||||||
|
ip neigh replace ${VM_IPV4} lladdr ${MAC} dev tap${VM_ID}i0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# En cas d'echec, on continue de parcourir les autres RANGES
|
# En cas d'echec, on continue de parcourir les autres RANGES
|
||||||
write_log WARN 'Empty value or doen’t correspond to an IPv4'
|
write_log WARN 'Empty value or doen’t correspond to an IPv4'
|
||||||
|
@ -213,6 +219,12 @@ for ID_RANGE_V6 in ${ID_RANGES_V6}; do
|
||||||
echo "${COMMAND}"
|
echo "${COMMAND}"
|
||||||
write_log INFO "${COMMAND}"
|
write_log INFO "${COMMAND}"
|
||||||
${COMMAND}
|
${COMMAND}
|
||||||
|
|
||||||
|
# If the previous command fails, it’s because trafic has
|
||||||
|
# already be sent to the VM
|
||||||
|
if [ $? =2 ]; then
|
||||||
|
ip neigh replace ${VM_NH} lladdr ${MAC} dev tap${VM_ID}i0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# En cas d'echec, on continue de parcourir les autres RANGES
|
# En cas d'echec, on continue de parcourir les autres RANGES
|
||||||
echo "Valeur vide ou ne correspond pas à un range IPV6"
|
echo "Valeur vide ou ne correspond pas à un range IPV6"
|
||||||
|
|
Loading…
Reference in a new issue