From b4e87d5c9805d7c0c38b68c04614ade5758fb3ff Mon Sep 17 00:00:00 2001 From: Andrei Ushakov Date: Tue, 14 Jul 2015 20:16:01 -0700 Subject: [PATCH] fix for #14633, use original nexthop ip value instead of obtained via RouteGet --- libnetwork/sandbox/route_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libnetwork/sandbox/route_linux.go b/libnetwork/sandbox/route_linux.go index 3055f69b51..7010957345 100644 --- a/libnetwork/sandbox/route_linux.go +++ b/libnetwork/sandbox/route_linux.go @@ -111,7 +111,7 @@ func programRoute(path string, dest *net.IPNet, nh net.IP) error { return netlink.RouteAdd(&netlink.Route{ Scope: netlink.SCOPE_UNIVERSE, LinkIndex: gwRoutes[0].LinkIndex, - Gw: gwRoutes[0].Gw, + Gw: nh, Dst: dest, }) }) @@ -128,7 +128,7 @@ func removeRoute(path string, dest *net.IPNet, nh net.IP) error { return netlink.RouteDel(&netlink.Route{ Scope: netlink.SCOPE_UNIVERSE, LinkIndex: gwRoutes[0].LinkIndex, - Gw: gwRoutes[0].Gw, + Gw: nh, Dst: dest, }) })