Merge pull request #396 from pyakpyak/master
fix for #14633, use original nexthop ip value instead of obtained via…
This commit is contained in:
commit
90de4b4f3f
|
@ -111,7 +111,7 @@ func programRoute(path string, dest *net.IPNet, nh net.IP) error {
|
||||||
return netlink.RouteAdd(&netlink.Route{
|
return netlink.RouteAdd(&netlink.Route{
|
||||||
Scope: netlink.SCOPE_UNIVERSE,
|
Scope: netlink.SCOPE_UNIVERSE,
|
||||||
LinkIndex: gwRoutes[0].LinkIndex,
|
LinkIndex: gwRoutes[0].LinkIndex,
|
||||||
Gw: gwRoutes[0].Gw,
|
Gw: nh,
|
||||||
Dst: dest,
|
Dst: dest,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -128,7 +128,7 @@ func removeRoute(path string, dest *net.IPNet, nh net.IP) error {
|
||||||
return netlink.RouteDel(&netlink.Route{
|
return netlink.RouteDel(&netlink.Route{
|
||||||
Scope: netlink.SCOPE_UNIVERSE,
|
Scope: netlink.SCOPE_UNIVERSE,
|
||||||
LinkIndex: gwRoutes[0].LinkIndex,
|
LinkIndex: gwRoutes[0].LinkIndex,
|
||||||
Gw: gwRoutes[0].Gw,
|
Gw: nh,
|
||||||
Dst: dest,
|
Dst: dest,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue