1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

fixed key ambiguities for uncovered becoming invalids

This commit is contained in:
Massimo Candela
2020-04-29 14:04:32 +02:00
parent 66f3da5a10
commit d7c7116e29
2 changed files with 6 additions and 6 deletions

View File

@@ -72,8 +72,8 @@ export default class MonitorRPKI extends Monitor {
rpki.validate(prefix, origin, true)
.then(result => {
if (result) {
const key = "a" + [prefix, origin]
.join("AS")
const key = "a" + [prefix, origin, result.valid]
.join("-")
.replace(/\./g, "_")
.replace(/\:/g, "_")
.replace(/\//g, "_");

View File

@@ -533,15 +533,15 @@ describe("Alerting", function () {
const expectedData = {
"a103_21_244_0_24AS13335": {
id: "a103_21_244_0_24AS13335",
"a103_21_244_0_24-13335-false": {
id: "a103_21_244_0_24-13335-false",
origin: 'rpki-monitor',
affected: '103.21.244.0/24',
message: 'The route 103.21.244.0/24 announced by AS13335 is not RPKI valid. Accepted with AS path: [1,2,3,4321,13335]. Valid ROA: origin AS0 prefix 103.21.244.0/23 max length 23',
},
"a8_8_8_8_22AS2914": {
id: "a8_8_8_8_22AS2914",
"a8_8_8_8_22-2914-": {
id: "a8_8_8_8_22-2914-",
origin: 'rpki-monitor',
affected: '8.8.8.8/22',
message: 'The route 8.8.8.8/22 announced by AS2914 is not covered by a ROA. Accepted with AS path: [1,2,3,4321,5060,2914]',