]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: extra validation for <port isolated='yes'/>
authorLaine Stump <laine@redhat.com>
Mon, 17 Feb 2020 03:34:59 +0000 (22:34 -0500)
committerLaine Stump <laine@redhat.com>
Fri, 21 Feb 2020 04:16:44 +0000 (23:16 -0500)
commitef8de28cb045c7c426392177cb56718dac8b18af
tree4ff5e910380792d6f8a0a7b797c58c71c2185d02
parentdb7f2628841b113c3bc1f2ed1295a0a484ce327f
conf: extra validation for <port isolated='yes'/>

During the hypervisor-agnostic validation of network devices, verify
that the interface type is either "network" or "bridge", and that if
there is any <virtualport>, that it doesn't have any type associated
with it.

This needs to be done both for the parse-time validation and for
runtime validation (after a port has been acquired from any associated
network), because an interface with type='network' could have an
actual type at runtime of "hostdev" or "direct", neither of which
support isolated='true' (yet). Likewise, if an interface is
type='network', then at runtime a <virtualport> with a type that
doesn't support isolated='yes' (e.g. "openvswitch", "802.1Qbh" -
currently *none* of the available virtualport types support it)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c