From 9ecda9ae18bd27e4bdb5832f39aaec12eede081d Mon Sep 17 00:00:00 2001 From: Tom Denham Date: Thu, 28 May 2015 18:28:25 -0700 Subject: [PATCH] Change scope to LINK when setting device routes Without this they don't have the desired effect. The default when creating these types of routes with ip route add is link - the old setting of universe was just wrong. Signed-off-by: Tom Denham --- sandbox/configure_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandbox/configure_linux.go b/sandbox/configure_linux.go index 2a6984b..6f106e8 100644 --- a/sandbox/configure_linux.go +++ b/sandbox/configure_linux.go @@ -156,7 +156,7 @@ func setInterfaceName(iface netlink.Link, settings *Interface) error { func setInterfaceRoutes(iface netlink.Link, settings *Interface) error { for _, route := range settings.Routes { err := netlink.RouteAdd(&netlink.Route{ - Scope: netlink.SCOPE_UNIVERSE, + Scope: netlink.SCOPE_LINK, LinkIndex: iface.Attrs().Index, Dst: route, })