From 73ae7b9680e1ed46b0ecdaca447e44128ec4140a Mon Sep 17 00:00:00 2001 From: toby Date: Mon, 11 Mar 2019 18:59:24 +0000 Subject: [PATCH] accepting up to /56 on ipv6 and bugfixing for wit-gc --- debian/wit-network-config.postinst | 2 +- files/wit-gc | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/wit-network-config.postinst b/debian/wit-network-config.postinst index 0834a4c..16be6ab 100755 --- a/debian/wit-network-config.postinst +++ b/debian/wit-network-config.postinst @@ -296,7 +296,7 @@ case "$1" in i=1 while true; do TEMP="$(dig_txt $i.ipv6.customers.prefixlist.$DOMAINNAME)" || break - TEMPSUM="ipv6 prefix-list WITv6-CUSTOMERS seq $((i*5)) permit ${TEMP} ge 64\n" + TEMPSUM="ipv6 prefix-list WITv6-CUSTOMERS seq $((i*5)) permit ${TEMP} ge 56\n" FRR_IPV6_CUSTOMERS_PFLIST="${FRR_IPV6_CUSTOMERS_PFLIST}${TEMPSUM}" let i+=1 done diff --git a/files/wit-gc b/files/wit-gc index ce84cf7..a4c7f75 100755 --- a/files/wit-gc +++ b/files/wit-gc @@ -15,13 +15,15 @@ done -for route in $(vtysh -c "show ip route kernel" | grep 'unknown inactive' | grep -Po 'K[ >]\* \K\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,3}') +for route in $(vtysh -c "show ip route kernel" | grep 'unknown inactive' | sed 's|.* \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\/[0-9]\{1,3\}\) \[.\/\([0-9]\{1,3\}\)\].*|\1-met-\2|') do - echo "removing zombie route: $route" - ip route add blackhole $route - ip route del $route + echo "removing zombie route: ${route/-met-/ metric }" + ip route add blackhole ${route/-met-/ metric } + ip route del ${route/-met-/ metric } done + +#all this spiel is not needed for ipv6 #for route in $(vtysh -c "show ipv6 route kernel" | grep 'unknown inactive' | awk '{ print $3 }') # do # echo "removing zombie route: $route"