Exit with error if the BGP community AS translation isn’t found
Signed-off-by: Alarig Le Lay <alelay@scaleway.com>
This commit is contained in:
parent
0070ef25c4
commit
7dc53046f8
|
@ -84,7 +84,12 @@ mkdir -p "${BIRD_CONF_PATH}"/functions
|
|||
if [ "${PEER_AS}" -gt 65535 ]; then
|
||||
# la t'es bien
|
||||
eval $(whois AS47214 | awk '/AS32 to AS16/ { print "AS"$5"="$7";" }' | sed -E 's/AS([0-9]+)/\1/g')
|
||||
eval COMMU_PEER_AS=\$AS${PEER_AS}
|
||||
if [ -n "${PEER_AS}" ]; then
|
||||
eval COMMU_PEER_AS=\$AS${PEER_AS}
|
||||
else
|
||||
echo "AS16 - AS32 from whois AS${IXP_ASN} not found"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
COMMU_PEER_AS=${PEER_AS}
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue