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 <tom.denham@metaswitch.com>
This commit is contained in:
Tom Denham 2015-05-28 18:28:25 -07:00
parent 364138bf2e
commit 5ad02e8c48

View file

@ -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,
})