• S
    While writing a couple of test cases for the nwfilter's XML parser I · e8132007
    Stefan Berger 提交于
    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.
    e8132007
nwfilter_conf.c 77.2 KB