提交 d3ab4298 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[NETFILTER]: tcp conntrack: accept SYN|URG as valid

Some stacks apparently send packets with SYN|URG set. Linux accepts
these packets, so TCP conntrack should to.

Pointed out by Martijn Posthuma <posthuma@sangine.com>.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e281db5c
...@@ -812,8 +812,10 @@ void ip_conntrack_tcp_update(struct sk_buff *skb, ...@@ -812,8 +812,10 @@ void ip_conntrack_tcp_update(struct sk_buff *skb,
static const u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] = static const u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
{ {
[TH_SYN] = 1, [TH_SYN] = 1,
[TH_SYN|TH_ACK] = 1,
[TH_SYN|TH_PUSH] = 1, [TH_SYN|TH_PUSH] = 1,
[TH_SYN|TH_URG] = 1,
[TH_SYN|TH_PUSH|TH_URG] = 1,
[TH_SYN|TH_ACK] = 1,
[TH_SYN|TH_ACK|TH_PUSH] = 1, [TH_SYN|TH_ACK|TH_PUSH] = 1,
[TH_RST] = 1, [TH_RST] = 1,
[TH_RST|TH_ACK] = 1, [TH_RST|TH_ACK] = 1,
......
...@@ -769,8 +769,10 @@ EXPORT_SYMBOL_GPL(nf_conntrack_tcp_update); ...@@ -769,8 +769,10 @@ EXPORT_SYMBOL_GPL(nf_conntrack_tcp_update);
static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] = static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
{ {
[TH_SYN] = 1, [TH_SYN] = 1,
[TH_SYN|TH_ACK] = 1,
[TH_SYN|TH_PUSH] = 1, [TH_SYN|TH_PUSH] = 1,
[TH_SYN|TH_URG] = 1,
[TH_SYN|TH_PUSH|TH_URG] = 1,
[TH_SYN|TH_ACK] = 1,
[TH_SYN|TH_ACK|TH_PUSH] = 1, [TH_SYN|TH_ACK|TH_PUSH] = 1,
[TH_RST] = 1, [TH_RST] = 1,
[TH_RST|TH_ACK] = 1, [TH_RST|TH_ACK] = 1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册