fix(routes): read the address of a "via inet6" next hop
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m17s
driver / test (3.13) (pull_request) Successful in 1m12s
driver / test (3.12) (pull_request) Successful in 1m18s
driver / lowest (pull_request) Successful in 37s
driver / build (pull_request) Successful in 40s
driver / security (pull_request) Successful in 1m25s
CI / driver (pull_request) Successful in 3m10s
driver / publish (pull_request) Skipped

iproute2 prints an IPv4 route with an IPv6 next hop (RFC 8950, BGP
unnumbered) as "via inet6 fe80::1", and the next hop was read as the
literal "inet6". The family word after "via" is now skipped, for
multipath next hops as well.

With the address in place, get_route_to would have reported such a
route as ipv6, because it took the family from the next hop too. The
family is now the destination's alone. The test fixture is ip's output
(iproute2 6.1.0) recorded in a network namespace set up with these
routes.

Closes #65
This commit is contained in:
Christian Manivong committed 2026-11-02 08:49:53 +01:00
1 parent 9089429c2d
commit ca65f007c1
4 files changed
+52 -2

No files matched your search

+5
View File
@@ -54,6 +54,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
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_route_to()` reads the next hop of an IPv4 route through an IPv6 gateway (RFC
8950, as BGP unnumbered sets up), which `ip route` prints as `via inet6 fe80::1`
(#65). The next hop came back as `inet6`; it is now the address, for multipath
routes too. Such a route stays `family: ipv4`: the family is the destination's,
never the next hop's.
- `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