Announce only local dev routes

This commit is contained in:
kaiyou 2020-05-21 18:21:43 +02:00
parent eae21ef5d7
commit 7045b23ed3
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ func Routes(filter *net.IPNet) <-chan []net.IPNet {
}
result := make([]net.IPNet, 0)
for _, route := range routes {
if route.Dst != nil && filter.Contains(route.Dst.IP) {
if route.Dst != nil && route.Gw == nil && filter.Contains(route.Dst.IP) {
result = append(result, *route.Dst)
}
}