mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-08-23 23:48:07 +00:00
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:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user