virtio: fix link up/down flag 15/26015/2
authorMohsin Kazmi <sykazmi@cisco.com>
Thu, 19 Mar 2020 13:03:31 +0000 (14:03 +0100)
committerDamjan Marion <dmarion@me.com>
Sat, 21 Mar 2020 12:06:26 +0000 (12:06 +0000)
commit529f0e97b6064039c500adce0d54b738954b2ffa
treeae4835cad1a0843fe0d22ed66dc2798e6bf55048
parente5d34919b4561a5ee11e41dec6b0184537b39696
virtio: fix link up/down flag

Type: fix

"set int state <interface> down" puts the virtio device link
down. It will not put the link in "UP" state, when
"set int state <interface up>" will be used again to change
the interface admin up. This patch fixes it.

To test:
create tap
set int state tap0 up
set int state tap0 down
sh hardware
sh int
set int state tap0 up
sh int
sh hardware

Change-Id: I3c0e31539f8a2a1e40220e7fb57eedecf408f067
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
src/vnet/devices/virtio/device.c