From fb61c68dd0ba2e6ce98516ddbbd3b10638f4bcea Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 29 Dec 2009 18:47:10 +0100 Subject: src: add support for TCP window scale factor This patch adds the missing bits to support the modification of the TCP window scale factor in a conntrack entry. The kernel support has been already there since 2.6.23. Signed-off-by: Pablo Neira Ayuso --- src/conntrack/copy.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/conntrack/copy.c') diff --git a/src/conntrack/copy.c b/src/conntrack/copy.c index 63bdf0b..7f7514d 100644 --- a/src/conntrack/copy.c +++ b/src/conntrack/copy.c @@ -224,6 +224,20 @@ static void copy_attr_tcp_mask_repl(struct nf_conntrack *dest, orig->protoinfo.tcp.flags[__DIR_REPL].mask; } +static void copy_attr_tcp_wscale_orig(struct nf_conntrack *dest, + const struct nf_conntrack *orig) +{ + dest->protoinfo.tcp.wscale[__DIR_ORIG] = + orig->protoinfo.tcp.wscale[__DIR_ORIG]; +} + +static void copy_attr_tcp_wscale_repl(struct nf_conntrack *dest, + const struct nf_conntrack *orig) +{ + dest->protoinfo.tcp.wscale[__DIR_REPL] = + orig->protoinfo.tcp.wscale[__DIR_REPL]; +} + static void copy_attr_sctp_state(struct nf_conntrack *dest, const struct nf_conntrack *orig) { @@ -455,4 +469,6 @@ copy_attr copy_attr_array[ATTR_MAX] = { [ATTR_DCCP_STATE] = copy_attr_dccp_state, [ATTR_DCCP_ROLE] = copy_attr_dccp_role, [ATTR_DCCP_HANDSHAKE_SEQ] = copy_attr_dccp_handshake_seq, + [ATTR_TCP_WSCALE_ORIG] = copy_attr_tcp_wscale_orig, + [ATTR_TCP_WSCALE_REPL] = copy_attr_tcp_wscale_repl, }; -- cgit v1.2.3