• Pablo Neira Ayuso's avatar
    netfilter: nft_bitwise: track register operations · be5650f8
    Pablo Neira Ayuso authored
    Check if the destination register already contains the data that this
    bitwise expression performs. This allows to skip this redundant
    operation.
    
    If the destination contains a different bitwise operation, cancel the
    register tracking information. If the destination contains no bitwise
    operation, update the register tracking information.
    
    Update the payload and meta expression to check if this bitwise
    operation has been already performed on the register. Hence, both the
    payload/meta and the bitwise expressions are reduced.
    
    There is also a special case: If source register != destination register
    and source register is not updated by a previous bitwise operation, then
    transfer selector from the source register to the destination register.
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    be5650f8
nf_tables.h 43.4 KB