Keep the path attributes of rejected routes, and show them
A rejected route was recorded with its prefix, reason and AS path, which is not enough to tell why a neighbor sent it: whether a /32 is a blackhole request, which communities a leaked route carries, which network marked it Only to Customer. Each recorded rejection now keeps the attributes of the UPDATE it came in, without the NLRI of MP_REACH_NLRI and MP_UNREACH_NLRI, and its next hop. The attributes are copied once per UPDATE, only when a route of it is rejected, and shared by its rejected routes. A route rejected later, when the RPKI data changes, has the attributes it was stored with. /api/routes/rejected gives them as `summary` and `attributes`, as for received routes, and the status page shows them under "show" in each row of the refused routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e1d819d629
commit
bd674002a2
7 files changed
+166
-29
No files matched your search
@@ -70,10 +70,12 @@ curl -s '127.0.0.1:8080/api/routes/received?address=193.0.0.1&best=true' | jq
|
||||
|
||||
Ferrix does not store rejected routes in the routing table. For each
|
||||
neighbor, it records the number of rejected routes for each reason, and the
|
||||
200 most recent rejected routes with their AS paths. The status page
|
||||
displays this information under "Refused routes", and the HTTP endpoint
|
||||
`/api/routes/rejected` returns it as JSON. To display the records for one
|
||||
neighbor, add `?peer=NAME`.
|
||||
200 most recent rejected routes with all the path attributes they were
|
||||
received with. The status page displays this information under "Refused
|
||||
routes"; to display the attributes of a rejected route, select **show** in
|
||||
its row. The HTTP endpoint `/api/routes/rejected` returns the same
|
||||
information as JSON. To display the records for one neighbor, add
|
||||
`?peer=NAME`.
|
||||
|
||||
```json
|
||||
[{"peer":"transit-a","total":3,"by_reason":{"RPKI invalid":2,"bogon prefix":1},
|
||||
|
||||
@@ -143,11 +143,29 @@ routes. To return the records for one neighbor, add `?peer=NAME`.
|
||||
"path_id": 0,
|
||||
"reason": "own AS in path",
|
||||
"as_path": [65001, 64500],
|
||||
"at_unix": 1791020702
|
||||
"at_unix": 1791020702,
|
||||
"summary": {
|
||||
"origin": "IGP",
|
||||
"as_path": [65001, 64500],
|
||||
"next_hop": "10.0.0.2",
|
||||
"med": null,
|
||||
"local_pref": null,
|
||||
"communities": [],
|
||||
"large_communities": []
|
||||
},
|
||||
"attributes": [
|
||||
{ "Origin": 0 },
|
||||
{ "AsPath": { "segments": [{ "ordered": true, "path": [65001, 64500] }] } },
|
||||
{ "NextHop": "10.0.0.2" }
|
||||
]
|
||||
}]
|
||||
}]
|
||||
```
|
||||
|
||||
| Field | Description |
|
||||
|---|---|
|
||||
| `summary`, `attributes` | The path attributes of the rejected route, in the same format as for received routes. For a route rejected when RPKI data changed, the attributes as stored, including those added by the import policy. |
|
||||
|
||||
## Kernel
|
||||
|
||||
`/api/kernel` returns the state of kernel route installation:
|
||||
|
||||
Reference in new issue
Block a user