diff options
author | Florian Westphal <fw@strlen.de> | 2016-08-01 17:11:41 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2016-08-01 17:11:41 +0200 |
commit | f9069cefdf991939da1c84b00edeea0ddd772b70 (patch) | |
tree | 95a644d84a16daf28ee93f36f3ce43ec25647cc1 /tests/py/ip/ip.t | |
parent | ac94031b8f3ba79de5e4fd15a456c01bd5e1b8b4 (diff) |
netlink: make checksum fixup work with odd-sized header fields
The kernel checksum functions want even-sized lengths except for
the last block at the end of the data.
This means that
nft --debug=netlink add rule filter output ip ecn set 1
must generate a two byte read and a two byte write:
[ payload load 2b @ network header + 0 => reg 1 ]
[ bitwise reg 1 = (reg=1 & 0x0000fcff ) ^ 0x00000100 ]
[ payload write reg 1 => 2b @ network header + 0 csum_type 1 csum_off 10 ]
Otherwise, while a one-byte write is enough, the kernel will
generate invalid checksums (unless checksum is offloaded).
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/ip.t')
0 files changed, 0 insertions, 0 deletions