diff options
author | lns <matzeton@googlemail.com> | 2022-05-05 13:04:44 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2022-05-06 22:30:58 +0200 |
commit | a41086043385e821c0340e0886a7c5175a1f490e (patch) | |
tree | 99420499b9b2edbcba8bcf8e1400446518042152 /utils/asn_update.sh | |
parent | 2e0dedbaae24a8662a494e15fe47a67ea30fdcec (diff) |
Added Edgecast and Cachefly CDNs.add/edgecast_and_cachefly_cdn
* 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 <matzeton@googlemail.com>
Diffstat (limited to 'utils/asn_update.sh')
-rwxr-xr-x | utils/asn_update.sh | 21 |
1 files changed, 19 insertions, 2 deletions
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 |