netfilter: don't do window scaling for a picked up connection
Subsystems (3)
PATCH 1/1 netfilter: don't do window scaling for a picked up connection
For a picked up connection, the window scaling option is also lost, because this option is only valid in SYN or SYN/ACK segments. We should remove the useless expression to save the CPU power.
--- net/netfilter/nf_conntrack_proto_tcp.c | 1 - 1 file changed, 1 deletion(-)
net/netfilter/nf_conntrack_proto_tcp.c +0 -1
@@ -584,7 +584,6 @@ static bool tcp_in_window(const struct nf_conn *ct,* Let's try to use the data from the packet. */ sender->td_end = end; - win <<= sender->td_scale; sender->td_maxwin = (win ==0 ?1 : win); sender->td_maxend = end + sender->td_maxwin;/*
Pablo Neira Ayuso
maintainerQuoted 13 lines · Changli Gao
For a picked up connection, the window scaling option is also lost, because this option is only valid in SYN or SYN/ACK segments. We should remove the useless expression to save the CPU power.
Signed-off-by Changli Gao <[email protected]>--- net/netfilter/nf_conntrack_proto_tcp.c | 1 - 1 file changed, 1 deletion(-)net/netfilter/nf_conntrack_proto_tcp.c +0
-0
net/netfilter/nf_conntrack_proto_tcp.c static bool tcp_in_window(const struct nf_conn *ct, · line 587
Quoted 4 lines
net/netfilter/nf_conntrack_proto_tcp.c +0
-1@@ -584,7 +584,6 @@ static bool tcp_in_window(const struct nf_conn *ct,* Let's try to use the data from the packet. */ sender->td_end = end; - win <<= sender->td_scale;
This breaks conntrackd and its ability to recover flows by injecting the window scaling via ctnetlink.
Quoted 3 lines · Pablo Neira Ayuso
This breaks conntrackd and its ability to recover flows by injecting the window scaling via ctnetlink.
Got it. Thanks.
Just forget this patch. I'll post another patch to fix the duplicate window scaling: one is here, and the other is before the state updating code.
Signature · 2 lines
Regards, Changli Gao([email protected])