• Stefano Brivio's avatar
    nf_tables: Add set type for arbitrary concatenation of ranges · 3c4287f6
    Stefano Brivio authored
    This new set type allows for intervals in concatenated fields,
    which are expressed in the usual way, that is, simple byte
    concatenation with padding to 32 bits for single fields, and
    given as ranges by specifying start and end elements containing,
    each, the full concatenation of start and end values for the
    single fields.
    
    Ranges are expanded to composing netmasks, for each field: these
    are inserted as rules in per-field lookup tables. Bits to be
    classified are divided in 4-bit groups, and for each group, the
    lookup table contains 4^2 buckets, representing all the possible
    values of a bit group. This approach was inspired by the Grouper
    algorithm:
    	http://www.cse.usf.edu/~ligatti/projects/grouper/
    
    Matching is performed by a sequence of AND operations between
    bucket values, with buckets selected according to the value of
    packet bits, for each group. The result of this sequence tells
    us which rules matched for a given field.
    
    In order to concate...
    3c4287f6
Makefile 8.95 KB