<br><tt><font size=2>libvir-list-bounces@redhat.com wrote on 03/25/2010
11:59:11 AM:<br>
<br>
<br>
> "Daniel P. Berrange" <berrange@redhat.com> wrote on
03/25/2010 11:49:05 AM:<br>
> <br>
> > Please respond to "Daniel P. Berrange" <br>
> > <br>
> > On Tue, Mar 23, 2010 at 10:54:17AM -0400, stefanb@us.ibm.com
wrote:<br>
> > > +/*<br>
> > > +    char macaddr[VIR_MAC_STRING_BUFLEN],<br>
> > > +         ipaddr[INET_ADDRSTRLEN],<br>
> > > +         number[20];<br>
> > > +    char chain[MAX_CHAINNAME_LENGTH];<br>
> > > +    virBuffer buf = VIR_BUFFER_INITIALIZER;<br>
> > > +<br>
> > > +    if (nwfilter->chainsuffix == VIR_NWFILTER_CHAINSUFFIX_ROOT)<br>
> > > +        PRINT_ROOT_CHAIN(chain, chainPrefix,
ifname);<br>
> > > +    else<br>
> > > +        PRINT_CHAIN(chain, chainPrefix,
ifname,<br>
> > > +                
   virNWFilterChainSuffixTypeToString<br>
> > (nwfilter->chainsuffix));<br>
> > <br>
> > Since we're passing this into the shell, I think we should do
paranoid<br>
> > validation on the 'chain' and 'ifname' fields, since they ultimately
come<br>
> > from the user specified XML. Validate that it only contains a-Z,
0-0, -, _ <br>
> <br>
> Actually the user specified XML only currently allows the chain names
'arp', <br>
> 'ipv4', 'ipv6' and 'root'. Others will already be rejected when <br>
> parsing the filter. <br>
> <br>
<br>
Actually, yes, there's a problem with target device names like t\"t
that do create an</font></tt>
<br><tt><font size=2>interface named t\"t but end up creating an ebtables
entry with interface t"t. So </font></tt>
<br><tt><font size=2>if I don't go through bash it works correctly, otherwise
it does not and I guess I</font></tt>
<br><tt><font size=2>would need to escape the '\' with '\\\'.</font></tt>
<br>
<br><tt><font size=2>   Stefan</font></tt>
<br>
<br><tt><font size=2><br>
> <br>
> > <br>
> > <br>
> > It would also be nice to put a variety of XML files in a tests/nwfilterdata<br>
> > directory and making a test suite to run the parser API against
them, as<br>
> > well as adding some real world examples in the examples/nwfilter
directory<br>
> > for end users to start from. <br>
> <br>
> In the v4 patch series I am adding filters to examples/xml/nwfilter
that are <br>
> automatically copied to /etc/libvirt/nwfilter for libvirt to pick
up. <br>
> <br>
> Gerhard has written a couple of test cases but they are for the external
<br>
> test suite from what I know. So, yes, we'll add test cases over time.
<br>
> <br>
>   Regards, <br>
>     Stefan <br>
> <br>
> > <br>
> > Regards,<br>
> > Daniel<br>
> > -- <br>
> > |: Red Hat, Engineering, London    -o-   </font></tt><a href=http://people.redhat.com/><tt><font size=2>http://people.redhat.com/</font></tt></a><tt><font size=2><br>
> berrange/:|<br>
> > |: </font></tt><a href=http://libvirt.org/><tt><font size=2>http://libvirt.org</font></tt></a><tt><font size=2>
-o- </font></tt><a href="http://virt-manager.org/"><tt><font size=2>http://virt-manager.org</font></tt></a><tt><font size=2>
-o- http://<br>
> deltacloud.org:|<br>
> > |: </font></tt><a href=http://autobuild.org/><tt><font size=2>http://autobuild.org</font></tt></a><tt><font size=2>
       -o-         </font></tt><a href=http://search.cpan.org/><tt><font size=2>http://search.cpan.org/</font></tt></a><tt><font size=2><br>
> ~danberr/:|<br>
> > |: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648
23C1 B3DF F742 <br>
> 7D3B 9505 :|--<br>
> libvir-list mailing list<br>
> libvir-list@redhat.com<br>
> </font></tt><a href="https://www.redhat.com/mailman/listinfo/libvir-list"><tt><font size=2>https://www.redhat.com/mailman/listinfo/libvir-list</font></tt></a>