]> git.ipfire.org Git - thirdparty/libvirt.git/commit
interface: Take interface status into account when starting and destroying
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Dec 2013 18:29:54 +0000 (19:29 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Dec 2013 16:20:00 +0000 (17:20 +0100)
commit5bd7ac029efc86fe8048060c88f03f2a9486d8d8
tree7e56b7ac47d064d196464c821513ba14c09148ad
parent50f5468c960f4fe491399d5a495426e6cb6b41f1
interface: Take interface status into account when starting and destroying

https://bugzilla.redhat.com/show_bug.cgi?id=956994

Currently, it is possible to start an interface that is already running:

 # virsh iface-start eth2
 Interface eth2 started

 # echo $?
 0

 # virsh iface-start eth2
 Interface eth2 started

 # echo $?
 0

 # virsh iface-start eth2
 Interface eth2 started

 # echo $?
 0

Same applies for destroying a dead interface. We should not allow such
state transitions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/interface/interface_backend_netcf.c