Download newest delegated list, and allow the ripedb_ilines_update to take a hardcoded list of ASNs (and prepopulate w/ 3303 and 12859)

git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@47 c5d60b8d-fdcb-4146-b734-af4215e9eb71
This commit is contained in:
pim
2010-03-08 21:40:37 +00:00
parent e355736cba
commit aba1b16a36
3 changed files with 4365 additions and 1372 deletions

View File

@ -8,6 +8,7 @@ PATH=/usr/local/bin:/usr/bin:/bin:/home/ircd/bin
INPUT_DELEGATED="/home/ircd/ircd/etc/ripedb/delegated-ripencc-latest" INPUT_DELEGATED="/home/ircd/ircd/etc/ripedb/delegated-ripencc-latest"
OUTPUT_ROOT="/home/ircd/ircd/etc" OUTPUT_ROOT="/home/ircd/ircd/etc"
MANUAL_ASN_LIST="3303,12859" # Comma separated
do_country() do_country()
# $1=country $2=class $3=threshold # $1=country $2=class $3=threshold
@ -60,7 +61,9 @@ function bitcron_main()
do_country li 202 10 || error "ilines.li.conf failed" do_country li 202 10 || error "ilines.li.conf failed"
echo "Gathering I-Lines for AS numbers" echo "Gathering I-Lines for AS numbers"
ASN_LIST=$(awk -F'|' '$2=/(CH|LI)/ { ASN_LIST=$MANUAL_ASN_LIST
[ -n "$ASN_LIST" ] && ASN_LIST=$ASN_LIST","
ASN_LIST=$ASN_LIST$(awk -F'|' '$2=/(CH|LI)/ {
if ($3 == "asn") { if ($3 == "asn") {
n++; n++;
if (n>1) { printf "," }; if (n>1) { printf "," };

View File

@ -43,7 +43,7 @@ def asn_to_route(_asn, _whois_server = "whois.ripe.net",
except: except:
return list return list
ifile = s.makefile('w') ifile = s.makefile('w')
ifile.write('-i origin AS'+_asn+'\r\n') ifile.write(('-i origin AS%s\r\n' % (_asn)))
ifile.flush() ifile.flush()
print("Fetching route/route6 for AS%s from %s" % (_asn, _whois_server)) print("Fetching route/route6 for AS%s from %s" % (_asn, _whois_server))
while True: while True:

File diff suppressed because it is too large Load Diff