diff --git a/wireguard/wireguard_linux.go b/wireguard/wireguard_linux.go index b0fbab6a..fce8436a 100644 --- a/wireguard/wireguard_linux.go +++ b/wireguard/wireguard_linux.go @@ -281,7 +281,7 @@ func GetDefaultGateway() (gwRoute netlink.Route, err error) { //get default gateway by filtering with dst==nil for _, r := range routes { - if r.Dst == nil { + if r.Dst == nil || r.Dst.IP.Equal(net.ParseIP("0.0.0.0")) || r.Dst.IP.Equal(net.ParseIP("::")) { gwRoutes = append(gwRoutes, r) } }