aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/reassembly.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@redhat.com>2014-08-01 06:29:44 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-02 18:31:31 -0400
commit06aa8b8a0345c78f4d9a1fb3f852952b12a0e40c (patch)
tree9511c6007eed4f71fe5e601688f35d6ff7dd4b9b /net/ipv6/reassembly.c
parentd2373862b3589260f0139a6e4969478f84154369 (diff)
inet: frags: rename last_in to flags
The last_in field has been used to store various flags different from first/last frag in so give it a more descriptive name: flags. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r--net/ipv6/reassembly.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 512ccc027ce3..b4baceed0d0d 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -131,7 +131,7 @@ void ip6_expire_frag_queue(struct net *net, struct frag_queue *fq,
131 131
132 spin_lock(&fq->q.lock); 132 spin_lock(&fq->q.lock);
133 133
134 if (fq->q.last_in & INET_FRAG_COMPLETE) 134 if (fq->q.flags & INET_FRAG_COMPLETE)
135 goto out; 135 goto out;
136 136
137 inet_frag_kill(&fq->q, frags); 137 inet_frag_kill(&fq->q, frags);
@@ -141,13 +141,13 @@ 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.last_in & INET_FRAG_EVICTED)) 144 if (!(fq->q.flags & INET_FRAG_EVICTED))
145 IP6_INC_STATS_BH(net, __in6_dev_get(dev), 145 IP6_INC_STATS_BH(net, __in6_dev_get(dev),
146 IPSTATS_MIB_REASMTIMEOUT); 146 IPSTATS_MIB_REASMTIMEOUT);
147 IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); 147 IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS);
148 148
149 /* Don't send error if the first segment did not arrive. */ 149 /* Don't send error if the first segment did not arrive. */
150 if (!(fq->q.last_in & INET_FRAG_FIRST_IN) || !fq->q.fragments) 150 if (!(fq->q.flags & INET_FRAG_FIRST_IN) || !fq->q.fragments)
151 goto out_rcu_unlock; 151 goto out_rcu_unlock;
152 152
153 /* 153 /*
@@ -209,7 +209,7 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
209 struct net *net = dev_net(skb_dst(skb)->dev); 209 struct net *net = dev_net(skb_dst(skb)->dev);
210 u8 ecn; 210 u8 ecn;
211 211
212 if (fq->q.last_in & INET_FRAG_COMPLETE) 212 if (fq->q.flags & INET_FRAG_COMPLETE)
213 goto err; 213 goto err;
214 214
215 offset = ntohs(fhdr->frag_off) & ~0x7; 215 offset = ntohs(fhdr->frag_off) & ~0x7;
@@ -240,9 +240,9 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
240 * or have different end, the segment is corrupted. 240 * or have different end, the segment is corrupted.
241 */ 241 */
242 if (end < fq->q.len || 242 if (end < fq->q.len ||
243 ((fq->q.last_in & INET_FRAG_LAST_IN) && end != fq->q.len)) 243 ((fq->q.flags & INET_FRAG_LAST_IN) && end != fq->q.len))
244 goto err; 244 goto err;
245 fq->q.last_in |= INET_FRAG_LAST_IN; 245 fq->q.flags |= INET_FRAG_LAST_IN;
246 fq->q.len = end; 246 fq->q.len = end;
247 } else { 247 } else {
248 /* Check if the fragment is rounded to 8 bytes. 248 /* Check if the fragment is rounded to 8 bytes.
@@ -260,7 +260,7 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
260 } 260 }
261 if (end > fq->q.len) { 261 if (end > fq->q.len) {
262 /* Some bits beyond end -> corruption. */ 262 /* Some bits beyond end -> corruption. */
263 if (fq->q.last_in & INET_FRAG_LAST_IN) 263 if (fq->q.flags & INET_FRAG_LAST_IN)
264 goto err; 264 goto err;
265 fq->q.len = end; 265 fq->q.len = end;
266 } 266 }
@@ -335,10 +335,10 @@ found:
335 */ 335 */
336 if (offset == 0) { 336 if (offset == 0) {
337 fq->nhoffset = nhoff; 337 fq->nhoffset = nhoff;
338 fq->q.last_in |= INET_FRAG_FIRST_IN; 338 fq->q.flags |= INET_FRAG_FIRST_IN;
339 } 339 }
340 340
341 if (fq->q.last_in == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) && 341 if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
342 fq->q.meat == fq->q.len) { 342 fq->q.meat == fq->q.len) {
343 int res; 343 int res;
344 unsigned long orefdst = skb->_skb_refdst; 344 unsigned long orefdst = skb->_skb_refdst;