]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_nat: support mangling a single TCP packet multiple times
authorPatrick McHardy <kaber@trash.net>
Thu, 11 Feb 2010 11:27:09 +0000 (12:27 +0100)
committerPatrick McHardy <kaber@trash.net>
Thu, 11 Feb 2010 11:27:09 +0000 (12:27 +0100)
commitcf1276f2eca3671f388edb721045b44be16c8a68
tree8922a2a87408ed185f3998011eab4c6a3e9f0c2b
parentf74f84a0bf22afa1be6331a692520ec31fa80db3
netfilter: nf_nat: support mangling a single TCP packet multiple times

nf_nat_mangle_tcp_packet() can currently only handle a single mangling
per window because it only maintains two sequence adjustment positions:
the one before the last adjustment and the one after.

This patch makes sequence number adjustment tracking in
nf_nat_mangle_tcp_packet() optional and allows a helper to manually
update the offsets after the packet has been fully handled.

Signed-off-by: Patrick McHardy <kaber@trash.net>
include/net/netfilter/nf_nat_helper.h
net/ipv4/netfilter/nf_nat_helper.c