summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-08-01 17:11:41 +0200
committerFlorian Westphal <fw@strlen.de>2016-08-01 17:11:41 +0200
commit78936d50f306c826b0c31d93743c4daec7104858 (patch)
tree7196a7b2da222d438338344b96b67bff423e867c /tests/py/ip6
parentfc2f5c4418283dbfc2e008bc4268e9d3b6f313ba (diff)
evaluate: add support to set IPv6 non-byte header fields
'ip6 ecn set 1' will generate a zero-sized write operation. Just like when matching on bit-sized header fields we need to round up to a byte-sized quantity and add a mask to retain those bits outside of the header bits that we want to change. Example: ip6 ecn set ce [ payload load 1b @ network header + 1 => reg 1 ] [ bitwise reg 1 = (reg=1 & 0x000000cf ) ^ 0x00000030 ] [ payload write reg 1 => 1b @ network header + 1 csum_type 0 csum_off 0 ] 1. Load the full byte containing the ecn bits 2. Mask out everything *BUT* the ecn bits 3. Set the CE mark This patch only works if the protocol doesn't need a checksum fixup. Will address this in a followup patch. This also doesn't yet include the needed reverse translation. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip6')
0 files changed, 0 insertions, 0 deletions