]> git.ipfire.org Git - thirdparty/nftables.git/commit
payload: fix stacked headers protocol context tracking
authorPatrick McHardy <kaber@trash.net>
Sun, 24 Apr 2016 10:22:30 +0000 (11:22 +0100)
committerPatrick McHardy <kaber@trash.net>
Sun, 24 Apr 2016 10:22:30 +0000 (11:22 +0100)
commit20b1131c07acd2fc71803be592430f0e06c4090e
treedc7c984f5bf2c2b29c2011825fd20805a0fd4166
parente20eac092725c982387181f3df557877b02eb345
payload: fix stacked headers protocol context tracking

The code contains multiple scattered around fragments to fiddle with the
protocol contexts to work around the fact that stacked headers update the
context for the incorrect layer.

Fix this by updating the correct layer in payload_expr_pctx_update() and
also take care of offset adjustments there and only there. Remove all
manual protocol context fiddling and change protocol context debugging to
also print the offset for stacked headers.

All previously successful testcases pass.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/evaluate.c
src/netlink_delinearize.c
src/payload.c
src/proto.c