summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2020-04-24 13:43:12 -0500
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-13 17:20:47 +0000
commit069411cd5e830164b284b08bd8a0c6a1318c5002 (patch)
tree4ab31b1e19bdd6b2f52b66e423b0a2fc723c76f5 /src/vnet
parent138d43ce77443559da70432905a98569f54270b7 (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> (cherry picked from commit 81284163a293759bc5c2d6a124639c6796589d15)
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 a954fef74fd..298a3e43c5a 100644
--- a/src/vnet/devices/netlink.c
+++ b/src/vnet/devices/netlink.c
@@ -184,7 +184,7 @@ vnet_netlink_set_link_state (int ifindex, int up)
vnet_netlink_msg_t m;
struct ifinfomsg ifmsg = { 0 };
- ifmsg.ifi_flags = IFF_UP;
+ ifmsg.ifi_flags = ((up) ? IFF_UP : 0);
ifmsg.ifi_change = IFF_UP;
ifmsg.ifi_index = ifindex;