fix(routes): give an FRR host route without a length /128 for IPv6

The FRR enrichment in get_route_to completed every prefix without a
length with /32. An IPv6 host route became a different, much larger
/32 prefix, so it missed the kernel's /128 entry for the same host
(stored that way since #6) and added a bogus one instead.

with_length() in _routes.py completes a prefix by its family, /32 or
/128. The protocol attributes move onto IpRoute, which keeps the import
in linux.py on one line; get_route_to shrinks and the baseline records
it.

Closes #64
This commit is contained in:
Christian Manivong committed 2026-11-02 08:48:39 +01:00
1 parent a1e8ec78c3
commit 9089429c2d
5 files changed
+62 -12

No files matched your search

+3 -1
View File
@@ -51,7 +51,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
hop. A typed route now has its real prefix and its type in
`protocol_attributes` (`{"type": "blackhole"}`), with no next hop and no outgoing
interface, since it sends nothing out. A multipath route has one entry per next hop,
each with its gateway and interface.
each with its gateway and interface. A host route that FRR reports without a prefix
length is a `/128` for IPv6 instead of a `/32` (#64), so it meets the kernel's route
for the same host and gets FRR's protocol.
- `get_available_updates()` works on dnf and yum hosts whose login user has
passwordless sudo (NOPASSWD), as netOrk's own account does, and marks the security
fixes there (#56). The security-advisory query did not parse under `sudo -n`, so no