1
0
Fork 0

Update rfc8416.php to populate locallyAddedAssertions > bgpsecAssertions with asn,comment,SKI,routerPublicKey, too.

This commit is contained in:
netravnen 2018-12-17 17:37:09 +00:00
parent 67fa9b17e2
commit 2cbb8fdf07
1 changed files with 12 additions and 2 deletions

View File

@ -148,11 +148,16 @@ foreach ($raw_array as $sub_array)
// Extract ASxxxxx from string.
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = $_asn[0];
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = $_maxlength;
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["comment"] = "$_ta - mnt-by $_mnt";
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["comment"] = "$_ta - mnt-by $_mnt";
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["SKI"] = "<some base64 SKI>";
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["routerPublicKey"] = "<some base64 public key>";
$k++;
}
}
@ -247,11 +252,16 @@ foreach ($raw_array as $sub_array)
// Extract ASxxxxx from string.
preg_match ("/AS[0-9]+/", explode (":", $asn)[1], $_asn);
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = $_asn[0];
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["prefix"] = $_prefix;
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["maxPrefixLength"] = $_maxlength;
$roas["locallyAddedAssertions"]["prefixAssertions"][$k]["comment"] = "$_ta - mnt-by $_mnt";
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["asn"] = trim ($_asn[0], "AS");
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["comment"] = "$_ta - mnt-by $_mnt";
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["SKI"] = "<some base64 SKI>";
$roas["locallyAddedAssertions"]["bgpsecAssertions"][$k]["routerPublicKey"] = "<some base64 public key>";
$k++;
}
}