From 82146158cd57bca04e21989953af29e78eaac506 Mon Sep 17 00:00:00 2001 From: toby Date: Tue, 23 Oct 2018 16:59:12 +0200 Subject: [PATCH] allowing the gre if local asn to be dynamically assigned as well --- debian/wit-network-config.postinst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/debian/wit-network-config.postinst b/debian/wit-network-config.postinst index d314cf6..8cf4c9e 100755 --- a/debian/wit-network-config.postinst +++ b/debian/wit-network-config.postinst @@ -87,13 +87,12 @@ case "$1" in if [[ $ifname = gre? ]] && [[ ! -z $ifalias ]]; then ifmtu=$(dig_txt mtu.${ifname}.${HOSTNAME}) local=$(dig_txt local.${ifname}.${HOSTNAME}) + localasn=$(dig_txt localasn.${ifname}.${HOSTNAME}) remote=$(dig_txt remote.${ifname}.${HOSTNAME}) ## for the GRE tunnel to not have to deal with ibgp/full-mesh or reflectors prepending a private AS - TIER_ID=$(echo $LOOPBACKv4 | cut -d . -f 3) - NODE_ID=$(echo $LOOPBACKv4 | cut -d . -f 4) - FRR_GRE_ASN="4200$(printf "%03d" $TIER_ID)$(printf "%03d" $NODE_ID)" + FRR_GRE_ASN="$localasn" ## build FRR interface config to enable ND adv for ipv6 unmanaged