ip -6 route show prints its default route as default ..., the same word as IPv4. default6 never occurs, so the ::/0 branch can never match. _make_entry then derives family = "ipv6" from the next hop. The result is an entry with network="0.0.0.0/0" and family="ipv6".
Effect
netOrk shows two 0.0.0.0/0 routes on a dual-stack host. Any consumer that filters default routes by network alone (for example counting static routes without the default route, as netOrk's gateway rule for NetOrk/netork#472 will) misclassifies the IPv6 default route.
Fix
Map default by family: the output of ip -6 route show gives ::/0. Either parse the two commands separately or decide by the next hop / dev family.
Test first
A host whose ip -6 route show contains default via fe80::1 dev eth0 proto ra yields ::/0 with family="ipv6".
**What happens**
`get_route_to` stores the IPv6 default route as `0.0.0.0/0`.
`linux.py:655`:
```python
network = "0.0.0.0/0" if raw_dest == "default" else ("::/0" if raw_dest == "default6" else raw_dest)
```
`ip -6 route show` prints its default route as `default ...`, the same word as IPv4. `default6` never occurs, so the `::/0` branch can never match. `_make_entry` then derives `family = "ipv6"` from the next hop. The result is an entry with `network="0.0.0.0/0"` and `family="ipv6"`.
**Effect**
netOrk shows two `0.0.0.0/0` routes on a dual-stack host. Any consumer that filters default routes by network alone (for example counting static routes without the default route, as netOrk's gateway rule for NetOrk/netork#472 will) misclassifies the IPv6 default route.
**Fix**
Map `default` by family: the output of `ip -6 route show` gives `::/0`. Either parse the two commands separately or decide by the next hop / `dev` family.
**Test first**
A host whose `ip -6 route show` contains `default via fe80::1 dev eth0 proto ra` yields `::/0` with `family="ipv6"`.
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
get_route_tostores the IPv6 default route as0.0.0.0/0.linux.py:655:ip -6 route showprints its default route asdefault ..., the same word as IPv4.default6never occurs, so the::/0branch can never match._make_entrythen derivesfamily = "ipv6"from the next hop. The result is an entry withnetwork="0.0.0.0/0"andfamily="ipv6".Effect
netOrk shows two
0.0.0.0/0routes on a dual-stack host. Any consumer that filters default routes by network alone (for example counting static routes without the default route, as netOrk's gateway rule for NetOrk/netork#472 will) misclassifies the IPv6 default route.Fix
Map
defaultby family: the output ofip -6 route showgives::/0. Either parse the two commands separately or decide by the next hop /devfamily.Test first
A host whose
ip -6 route showcontainsdefault via fe80::1 dev eth0 proto rayields::/0withfamily="ipv6".