From b2648a45a377fb891319e59e2aa94729705c6c2a Mon Sep 17 00:00:00 2001 From: Toni Date: Sat, 7 May 2022 09:33:25 +0200 Subject: Added Edgecast and Cachefly CDNs. (#1540) * Improved ASN update script * Ran `utils/update_every_lists.sh' * `tests/do.sh.in' prints the amount of failed pcap(s) * `utils/asn_update.sh' prints the amount of failed download(s) Signed-off-by: lns --- utils/asn_update.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'utils/asn_update.sh') diff --git a/utils/asn_update.sh b/utils/asn_update.sh index 5224bbc27..81098ab6a 100755 --- a/utils/asn_update.sh +++ b/utils/asn_update.sh @@ -1,6 +1,7 @@ #!/bin/bash -set -e +FAILED_ASN=0 +TOTAL_ASN=0 function processing_list() { local LIST_MERGED="/tmp/list_m" @@ -15,7 +16,11 @@ function create_list() { LIST=/tmp/list for i in "${@:3}"; do - ./get_routes_by_asn.sh "$i" >> $LIST + TOTAL_ASN=$(( TOTAL_ASN + 1 )) + if ! ./get_routes_by_asn.sh "$i" >> $LIST; then + echo "Could not fetch route for ${i} (${1})" + FAILED_ASN=$(( FAILED_ASN + 1 )) + fi done processing_list "$LIST" "$1" "$2" @@ -113,3 +118,15 @@ echo "(1) Downloading Citrix routes..." #Citrix or a more generic LogMeIn stuff? DEST=../src/lib/inc_generated/ndpi_asn_citrix.c.inc create_list NDPI_PROTOCOL_CITRIX $DEST "AS395424" "AS21866" "AS213380" "AS20104" "AS16815" echo "(3) Citrix IPs are available in $DEST" + +echo "(1) Downloading Edgecast routes..." +DEST=../src/lib/inc_generated/ndpi_asn_edgecast.c.inc +create_list NDPI_PROTOCOL_EDGECAST $DEST "AS15133" +echo "(3) Edgecast IPs are available in $DEST" + +if [ ${TOTAL_ASN} -eq ${FAILED_ASN} ]; then + printf '%s: %s\n' "${0}" "All download(s) failed, ./get_routes_by_asn.sh broken?" + exit 1 +else + exit 0 +fi -- cgit v1.2.3