]> git.ipfire.org Git - thirdparty/libvirt.git/commit
While writing a couple of test cases for the nwfilter's XML parser I
authorStefan Berger <stefanb@us.ibm.com>
Thu, 1 Apr 2010 10:37:26 +0000 (06:37 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Thu, 1 Apr 2010 10:37:26 +0000 (06:37 -0400)
commite8132007147a15db73ba561a7e288c49e782e447
tree4e91a0184c07add87381ad9eb73c1ad1a6ee0670
parent6cbc33063acb990f3381922e40b7d1bd0958a21b
While writing a couple of test cases for the nwfilter's XML parser I
found some cases where the output ended up not looking as expected. So
the following changes are in the patch below:

- if the protocol ID in the MAC header is an integer, just write it into
the datastructure without trying to find a corresponding string for it
and if none is found failing
- when writing the protocol ID as string, simply write it as integer if
no corresponding string can be found
- same changes for arpOpcode parsing and printing
- same changes for protocol ID in an IP packet
- DSCP value needs to be written into the data structure
- IP protocol version number is redundant at this level, so remove it
- parse the protocol ID found inside an IP packet not only as string but
also as uint8
- arrange the display of the src and destination masks to be shown after
the src and destination ip address respectively in the XML
- the existing libvirt IP address parser accepts for example '25' as an
IP address. I want this to be parsed as a CIDR type netmask. So try to
parse it as an integer first (CIDR netmask) and if that doesn't work as
a dotted IP address style netmask.
- instantiation of rules with MAC masks didn't work because they weren't
printed into a buffer, yet.
src/conf/nwfilter_conf.c
src/nwfilter/nwfilter_ebiptables_driver.c