9 #include <linux/types.h>
11 #include <linux/export.h>
12 #include <linux/tcp.h>
14 #include <linux/netfilter.h>
21 static u16 tcp_port_rover;
37 unsigned int iphdroff,
unsigned int hdroff,
42 __be16 *portptr, newport, oldport;
48 if (skb->
len >= hdroff +
sizeof(
struct tcphdr))
49 hdrsize =
sizeof(
struct tcphdr);
58 newport = tuple->
src.u.tcp.port;
62 newport = tuple->
dst.u.tcp.port;
69 if (hdrsize <
sizeof(*hdr))
73 inet_proto_csum_replace2(&hdr->
check, skb, oldport, newport, 0);
79 .manip_pkt = tcp_manip_pkt,
81 .unique_tuple = tcp_unique_tuple,
82 #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)