cope with errors during route traversal

Fixes #1909.
This commit is contained in:
Matthias Radestock committed 2016-01-19 15:28:31 +00:00
1 parent c391092ea6
commit 0caa9dd652
2 files changed
+8 -7

No files matched your search

+1 -2
View File
@@ -57,8 +57,7 @@ func EnsureInterfaceAndMcastRoute(ifaceName string) (*net.Interface, error) {
return iface, err
}
for update := range ch {
link, _ := netlink.LinkByIndex(update.Route.LinkIndex)
if link.Attrs().Name == ifaceName && update.Route.Dst.IP.Equal(dest) {
if update.Route.LinkIndex == iface.Index && update.Route.Dst.IP.Equal(dest) {
break
}
}