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:
parent
364138bf2e
commit
5ad02e8c48
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue