Compare commits
2 commits
412f8a0647
...
f8d989485a
Author | SHA1 | Date | |
---|---|---|---|
netravnen | f8d989485a | ||
netravnen | 9a5f9e6a52 |
|
@ -103,6 +103,8 @@ foreach ($raw_array as $sub_array)
|
||||||
// Extract ASxxxxx from string.
|
// Extract ASxxxxx from string.
|
||||||
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
||||||
|
|
||||||
|
// Catch if ASN is actually an integer and larger than zero
|
||||||
|
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) {
|
||||||
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
|
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
|
||||||
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
|
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
|
||||||
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0);
|
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0);
|
||||||
|
@ -111,6 +113,7 @@ foreach ($raw_array as $sub_array)
|
||||||
|
|
||||||
$k++;
|
$k++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -203,6 +206,8 @@ foreach ($raw_array as $sub_array)
|
||||||
// Extract ASxxxxx from string.
|
// Extract ASxxxxx from string.
|
||||||
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
||||||
|
|
||||||
|
// Catch if ASN is actually an integer and larger than zero
|
||||||
|
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) {
|
||||||
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
|
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
|
||||||
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
|
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
|
||||||
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0);
|
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0);
|
||||||
|
@ -211,6 +216,7 @@ foreach ($raw_array as $sub_array)
|
||||||
|
|
||||||
$k++;
|
$k++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeRoutinatorExceptionFile($roas);
|
writeRoutinatorExceptionFile($roas);
|
||||||
|
|
|
@ -97,6 +97,8 @@ foreach ($raw_array as $sub_array)
|
||||||
// Extract ASxxxxx from string.
|
// Extract ASxxxxx from string.
|
||||||
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
||||||
|
|
||||||
|
// Catch if ASN is actually an integer and larger than zero
|
||||||
|
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) {
|
||||||
$roas["roas"][$k]["asn"] = trim ($_asn[0], "AS");
|
$roas["roas"][$k]["asn"] = trim ($_asn[0], "AS");
|
||||||
$roas["roas"][$k]["prefix"] = $_prefix;
|
$roas["roas"][$k]["prefix"] = $_prefix;
|
||||||
$roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0);
|
$roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0);
|
||||||
|
@ -107,6 +109,7 @@ foreach ($raw_array as $sub_array)
|
||||||
|
|
||||||
$k++;
|
$k++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -199,6 +202,8 @@ foreach ($raw_array as $sub_array)
|
||||||
// Extract ASxxxxx from string.
|
// Extract ASxxxxx from string.
|
||||||
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
|
||||||
|
|
||||||
|
// Catch if ASN is actually an integer and larger than zero
|
||||||
|
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) {
|
||||||
$roas["roas"][$k]["asn"] = trim ($_asn[0], "AS");
|
$roas["roas"][$k]["asn"] = trim ($_asn[0], "AS");
|
||||||
$roas["roas"][$k]["prefix"] = $_prefix;
|
$roas["roas"][$k]["prefix"] = $_prefix;
|
||||||
$roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0);
|
$roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0);
|
||||||
|
@ -209,6 +214,7 @@ foreach ($raw_array as $sub_array)
|
||||||
|
|
||||||
$k++;
|
$k++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -98,12 +98,12 @@ for FILE in $(ls -1 roa/{bird*.conf,export*.json,README.md} | sed -e 's_roa/__g'
|
||||||
done
|
done
|
||||||
|
|
||||||
# Commit latest version of ROA files
|
# Commit latest version of ROA files
|
||||||
git -C roa/ add README.md *.conf *.json *.sha256
|
git -C roa/ add README.md "*.conf" "*.json" "*.sha256"
|
||||||
git -C roa/ commit -m "Updated ROA files - $ISO_DATE" --quiet
|
git -C roa/ commit -m "Updated ROA files - $ISO_DATE" --quiet
|
||||||
|
|
||||||
# Push ROA repository to every remote configured
|
# Push ROA repository to every remote configured, except github
|
||||||
if [ $(git -C roa/ remote | grep -vi upstream | wc -l) > 0 ] ; then
|
if [ $(git -C roa/ remote | grep -viP '(github|upstream)' | wc -l) > 0 ] ; then
|
||||||
for REMOTE in $(git -C roa/ remote | grep -vi upstream | paste -sd " " -) ; do
|
for REMOTE in $(git -C roa/ remote | grep -vi github | paste -sd " " -) ; do
|
||||||
git -C roa/ push $REMOTE master:master --quiet
|
git -C roa/ push $REMOTE master:master --quiet
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue