Compare commits

..

No commits in common. "f8d989485a6fd03de2f59b4455eaa6d18890d0a4" and "412f8a06471954a2367d2ef4b007b189f86cc77e" have entirely different histories.

3 changed files with 32 additions and 44 deletions

View file

@ -103,16 +103,13 @@ 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 $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) { $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS"); $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0);
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix; $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["source"] = "$_ta";
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0); $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["mnt-by"] = "$_mnt";
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["source"] = "$_ta";
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["mnt-by"] = "$_mnt";
$k++; $k++;
}
} }
} }
@ -206,16 +203,13 @@ 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 $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) { $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS"); $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0);
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix; $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["source"] = "$_ta";
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0); $roas["locallyAddedAssertions"]["prefixAssertions"][$k]["mnt-by"] = "$_mnt";
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["source"] = "$_ta";
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["mnt-by"] = "$_mnt";
$k++; $k++;
}
} }
} }

View file

@ -97,18 +97,15 @@ 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 $roas["roas"][$k]["asn"] = trim ($_asn[0], "AS");
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) { $roas["roas"][$k]["prefix"] = $_prefix;
$roas["roas"][$k]["asn"] = trim ($_asn[0], "AS"); $roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0);
$roas["roas"][$k]["prefix"] = $_prefix; //$roas["roas"][$k]["url"]["inetnum"] = "$web_registry_url/data/inet6num/$prefix[1]_$prefix[2]";
$roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV6_AS0); //$roas["roas"][$k]["url"]["route"] = "$web_registry_url/data/route6/$prefix[1]_$prefix[2]";
//$roas["roas"][$k]["url"]["inetnum"] = "$web_registry_url/data/inet6num/$prefix[1]_$prefix[2]"; $roas["roas"][$k]["ta"] = $_ta;
//$roas["roas"][$k]["url"]["route"] = "$web_registry_url/data/route6/$prefix[1]_$prefix[2]"; $roas["roas"][$k]["mnt-by"] = $_mnt;
$roas["roas"][$k]["ta"] = $_ta;
$roas["roas"][$k]["mnt-by"] = $_mnt;
$k++; $k++;
}
} }
} }
@ -202,18 +199,15 @@ 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 $roas["roas"][$k]["asn"] = trim ($_asn[0], "AS");
if (strlen ($_asn[0]) > 0 && strlen ($_prefix) > 0) { $roas["roas"][$k]["prefix"] = $_prefix;
$roas["roas"][$k]["asn"] = trim ($_asn[0], "AS"); $roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0);
$roas["roas"][$k]["prefix"] = $_prefix; //$roas["roas"][$k]["url"]["inetnum"] = "$web_registry_url/data/inetnum/$prefix[1]_$prefix[2]";
$roas["roas"][$k]["maxLength"] = ($_asn[0] != "AS0" ? $_maxlength : MAX_LEN_IPV4_AS0); //$roas["roas"][$k]["url"]["route"] = "$web_registry_url/data/route/$prefix[1]_$prefix[2]";
//$roas["roas"][$k]["url"]["inetnum"] = "$web_registry_url/data/inetnum/$prefix[1]_$prefix[2]"; $roas["roas"][$k]["ta"] = $_ta;
//$roas["roas"][$k]["url"]["route"] = "$web_registry_url/data/route/$prefix[1]_$prefix[2]"; $roas["roas"][$k]["mnt-by"] = $_mnt;
$roas["roas"][$k]["ta"] = $_ta;
$roas["roas"][$k]["mnt-by"] = $_mnt;
$k++; $k++;
}
} }
} }

View file

@ -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, except github # Push ROA repository to every remote configured
if [ $(git -C roa/ remote | grep -viP '(github|upstream)' | wc -l) > 0 ] ; then if [ $(git -C roa/ remote | grep -vi upstream | wc -l) > 0 ] ; then
for REMOTE in $(git -C roa/ remote | grep -vi github | paste -sd " " -) ; do for REMOTE in $(git -C roa/ remote | grep -vi upstream | paste -sd " " -) ; do
git -C roa/ push $REMOTE master:master --quiet git -C roa/ push $REMOTE master:master --quiet
done done
fi fi