aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@redhat.com>2014-08-01 06:29:47 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-02 18:31:31 -0400
commit2e404f632f44979ddf0ce0808a438249a72d7015 (patch)
treead03dac0a0596292475d7ac25b99c79a3499ee0d /net/ipv6
parentf926e23660d52601089222cb4755aabc693ca390 (diff)
inet: frags: use INET_FRAG_EVICTED to prevent icmp messages
Now that we have INET_FRAG_EVICTED we might as well use it to stop sending icmp messages in the "frag_expire" functions instead of stripping INET_FRAG_FIRST_IN from their flags when evicting. Also fix the comment style in ip6_expire_frag_queue(). Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Reviewed-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/reassembly.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index b4baceed0d0d..beb6872a8fa5 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -141,19 +141,20 @@ void ip6_expire_frag_queue(struct net *net, struct frag_queue *fq,
141 if (!dev) 141 if (!dev)
142 goto out_rcu_unlock; 142 goto out_rcu_unlock;
143 143
144 if (!(fq->q.flags & INET_FRAG_EVICTED))
145 IP6_INC_STATS_BH(net, __in6_dev_get(dev),
146 IPSTATS_MIB_REASMTIMEOUT);
147 IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); 144 IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
148 145
146 if (fq->q.flags & INET_FRAG_EVICTED)
147 goto out_rcu_unlock;
148
149 IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMTIMEOUT);
150
149 /* Don't send error if the first segment did not arrive. */ 151 /* Don't send error if the first segment did not arrive. */
150 if (!(fq->q.flags & INET_FRAG_FIRST_IN) || !fq->q.fragments) 152 if (!(fq->q.flags & INET_FRAG_FIRST_IN) || !fq->q.fragments)
151 goto out_rcu_unlock; 153 goto out_rcu_unlock;
152 154
153 /* 155 /* But use as source device on which LAST ARRIVED
154 But use as source device on which LAST ARRIVED 156 * segment was received. And do not use fq->dev
155 segment was received. And do not use fq->dev 157 * pointer directly, device might already disappeared.
156 pointer directly, device might already disappeared.
157 */ 158 */
158 fq->q.fragments->dev = dev; 159 fq->q.fragments->dev = dev;
159 icmpv6_send(fq->q.fragments, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0); 160 icmpv6_send(fq->q.fragments, ICMPV6_TIME_EXCEED, ICMPV6_EXC_FRAGTIME, 0);