Commit 9f3cd7bd authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: move check for already tracked/untracked before fragment check

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent caff42cd
......@@ -688,6 +688,12 @@ unsigned int ip_conntrack_in(unsigned int hooknum,
int set_reply;
int ret;
/* Previously seen (loopback or untracked)? Ignore. */
if ((*pskb)->nfct) {
CONNTRACK_STAT_INC(ignore);
return NF_ACCEPT;
}
/* Never happen */
if ((*pskb)->nh.iph->frag_off & htons(IP_OFFSET)) {
if (net_ratelimit()) {
......@@ -715,12 +721,6 @@ unsigned int ip_conntrack_in(unsigned int hooknum,
}
#endif
/* Previously seen (loopback or untracked)? Ignore. */
if ((*pskb)->nfct) {
CONNTRACK_STAT_INC(ignore);
return NF_ACCEPT;
}
proto = ip_ct_find_proto((*pskb)->nh.iph->protocol);
/* It may be an special packet, error, unclean...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment