aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2020-04-24 13:43:12 -0500
committerDamjan Marion <dmarion@me.com>2020-04-27 10:54:13 +0000
commit81284163a293759bc5c2d6a124639c6796589d15 (patch)
tree708b962fbb6a3fb80be57cfb0389319fd6221c4d /src/vnet
parent770178e365b5c37ecdecfecb424003cca7343ede (diff)
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. Change-Id: I0d44406d982afbdc43bc6b26d0f22c0bdd47abdc Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/devices/netlink.c b/src/vnet/devices/netlink.c
index 72603514772..34309e1b916 100644
--- a/src/vnet/devices/netlink.c
+++ b/src/vnet/devices/netlink.c
@@ -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;