devices: allow link state down with netlink
Type: fix
Use the up parameter in vnet_netlink_set_link_state(). It was
ignoring the parameter and always setting IFF_UP on an interface.
@@ -201,7 +201,7 @@ vnet_netlink_set_link_state (int ifindex, int up)
struct ifinfomsg ifmsg = { 0 };
clib_error_t *err = 0;
- ifmsg.ifi_flags = IFF_UP;
+ ifmsg.ifi_flags = ((up) ? IFF_UP : 0);
ifmsg.ifi_change = IFF_UP;
ifmsg.ifi_index = ifindex;
