For an IPv4 route with an IPv6 next hop (RFC 5549 / RFC 8950, common with BGP unnumbered and FRR), iproute2 prints default via inet6 fe80::1 dev eth0 proto bgp metric 20 (nexthop via inet6 … for multipath). The next hop is then read as the literal inet6.
Expected
An optional address family word after via (inet, inet6) is skipped; the next hop is the address. Test-first: ip -4 route show output with via inet6 fe80::1 yields next hop fe80::1.
Priority: P4 — wrong next hop on hosts with IPv6-next-hop IPv4 routes.
Found during the bug sweep of 2026-11-02.
## What happens
`_routes.py` reads the next hop with
```python
_VIA = re.compile(r"via\s+(\S+)")
```
For an IPv4 route with an IPv6 next hop (RFC 5549 / RFC 8950, common with BGP unnumbered and FRR), iproute2 prints `default via inet6 fe80::1 dev eth0 proto bgp metric 20` (`nexthop via inet6 …` for multipath). The next hop is then read as the literal `inet6`.
## Expected
An optional address family word after `via` (`inet`, `inet6`) is skipped; the next hop is the address. Test-first: `ip -4 route show` output with `via inet6 fe80::1` yields next hop `fe80::1`.
Priority: P4 — wrong next hop on hosts with IPv6-next-hop IPv4 routes.
Found during the bug sweep of 2026-11-02.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
_routes.pyreads the next hop withFor an IPv4 route with an IPv6 next hop (RFC 5549 / RFC 8950, common with BGP unnumbered and FRR), iproute2 prints
default via inet6 fe80::1 dev eth0 proto bgp metric 20(nexthop via inet6 …for multipath). The next hop is then read as the literalinet6.Expected
An optional address family word after
via(inet,inet6) is skipped; the next hop is the address. Test-first:ip -4 route showoutput withvia inet6 fe80::1yields next hopfe80::1.Priority: P4 — wrong next hop on hosts with IPv6-next-hop IPv4 routes.
Found during the bug sweep of 2026-11-02.