fix(netlink): RouteList list routes from all tables

- Do not filter by link anymore
- IPv6 detection simplified
This commit is contained in:
Quentin McGaw
2023-06-08 09:12:46 +00:00
parent c58d6d4de2
commit 40cdb4f662
12 changed files with 43 additions and 48 deletions

View File

@@ -25,7 +25,7 @@ func (d DefaultRoute) String() string {
}
func (r *Routing) DefaultRoutes() (defaultRoutes []DefaultRoute, err error) {
routes, err := r.netLinker.RouteList(nil, netlink.FamilyAll)
routes, err := r.netLinker.RouteList(netlink.FamilyAll)
if err != nil {
return nil, fmt.Errorf("listing routes: %w", err)
}