]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[NETFILTER]: tcp conntrack: accept SYN|URG as valid
authorPatrick McHardy <kaber@trash.net>
Sat, 24 Mar 2007 20:36:52 +0000 (21:36 +0100)
committerAdrian Bunk <bunk@stusta.de>
Sat, 24 Mar 2007 20:36:52 +0000 (21:36 +0100)
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: Patrick McHardy <kaber@trash.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
net/netfilter/nf_conntrack_proto_tcp.c

index e0dc370635459a499ebfd725a5a87842830addac..d6ffc9b41bf395ff53fb445337407acbe64ad1f7 100644 (file)
@@ -820,8 +820,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] =
 {
        [TH_SYN]                        = 1,
-       [TH_SYN|TH_ACK]                 = 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_RST]                        = 1,
        [TH_RST|TH_ACK]                 = 1,
index 6492ed66fb3c6cb033d9db835cc0eac006ce8fa3..309f44e8224628b44a6d4976d997d08068e7a655 100644 (file)
@@ -778,8 +778,10 @@ void nf_conntrack_tcp_update(struct sk_buff *skb,
 static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
 {
        [TH_SYN]                        = 1,
-       [TH_SYN|TH_ACK]                 = 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_RST]                        = 1,
        [TH_RST|TH_ACK]                 = 1,