diff options
author | Haibo Xi <haibbo@gmail.com> | 2012-12-06 18:42:17 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-12-16 17:41:25 -0500 |
commit | 97cf00e93cc24898493e7a058105e3215257ee04 (patch) | |
tree | 2e5dc412ebebf1cc54ad434017db90cb5aa6a2cf /net | |
parent | d7a769ff0e8f908ae8113fe523e7806b6d0b5fc7 (diff) |
netfilter: nf_ct_reasm: fix conntrack reassembly expire code
Commit b836c99fd6c9 (ipv6: unify conntrack reassembly expire
code with standard one) use the standard IPv6 reassembly
code(ip6_expire_frag_queue) to handle conntrack reassembly expire.
In ip6_expire_frag_queue, it invoke dev_get_by_index_rcu to get
which device received this expired packet.so we must save ifindex
when NF_conntrack get this packet.
With this patch applied, I can see ICMP Time Exceeded sent
from the receiver when the sender sent out 1/2 fragmented
IPv6 packet.
Signed-off-by: Haibo Xi <haibbo@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 22c8ea951185..3dacecc99065 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -311,7 +311,10 @@ found: | |||
311 | else | 311 | else |
312 | fq->q.fragments = skb; | 312 | fq->q.fragments = skb; |
313 | 313 | ||
314 | skb->dev = NULL; | 314 | if (skb->dev) { |
315 | fq->iif = skb->dev->ifindex; | ||
316 | skb->dev = NULL; | ||
317 | } | ||
315 | fq->q.stamp = skb->tstamp; | 318 | fq->q.stamp = skb->tstamp; |
316 | fq->q.meat += skb->len; | 319 | fq->q.meat += skb->len; |
317 | if (payload_len > fq->q.max_size) | 320 | if (payload_len > fq->q.max_size) |