]> xenbits.xensource.com Git - libvirt.git/commit
nwfilter: Return error message about unresolvable variables
authorStefan Berger <stefanb@us.ibm.com>
Mon, 27 Jun 2011 16:53:59 +0000 (12:53 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Mon, 27 Jun 2011 16:53:59 +0000 (12:53 -0400)
commitecfbf79541c76a884b25af6b022b601570f39b25
treef5d8ed7e18c29df70da74be9285c0ee00efdfbda
parent28e45afc3f0808e31159162aef3ac5f5aa1ecd21
nwfilter: Return error message about unresolvable variables

This is in response to bugzilla 664629

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

The patch below returns an appropriate error message if the chain of
nwfilters is found to contain unresolvable variables and therefore
cannot be instantiated.

Example: The following XMl added to a domain:

    <interface type='bridge'>
      <mac address='52:54:00:9f:80:45'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <filterref filter='test'/>
    </interface>

that references the following filter

<filter name='test' chain='root'>
  <filterref filter='clean-traffic'/>
  <filterref filter='allow-dhcp-server'/>
</filter>

now displays upon 'virsh start mydomain'

error: Failed to start domain mydomain
error: internal error Cannot instantiate filter due to unresolvable variable: DHCPSERVER

'DHPCSERVER' is contained in allow-dhcp-server.
src/nwfilter/nwfilter_gentech_driver.c