summaryrefslogtreecommitdiff
path: root/net/ipv4/ip_fragment.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-03-29 02:35:27 +0300
committerDavid S. Miller <davem@davemloft.net>2008-03-29 02:35:27 +0300
commitbc578a54f0fd489d0722303f9a52508495ccaf9a (patch)
tree6d0820f88aec63d764bef404b326ef65042d29aa /net/ipv4/ip_fragment.c
parentbe2ce06b4962658d807410e58f7c6b739dc6a0c3 (diff)
downloadlinux-bc578a54f0fd489d0722303f9a52508495ccaf9a.tar.xz
[NET]: Rename inet_frag.h identifiers COMPLETE, FIRST_IN, LAST_IN to INET_FRAG_*
On Fri, 2008-03-28 at 03:24 -0700, Andrew Morton wrote: > they should all be renamed. Done for include/net and net Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_fragment.c')
-rw-r--r--net/ipv4/ip_fragment.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index fcb60e76b234..02ae470fe60c 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -194,7 +194,7 @@ static void ip_expire(unsigned long arg)
spin_lock(&qp->q.lock);
- if (qp->q.last_in & COMPLETE)
+ if (qp->q.last_in & INET_FRAG_COMPLETE)
goto out;
ipq_kill(qp);
@@ -202,7 +202,7 @@ static void ip_expire(unsigned long arg)
IP_INC_STATS_BH(IPSTATS_MIB_REASMTIMEOUT);
IP_INC_STATS_BH(IPSTATS_MIB_REASMFAILS);
- if ((qp->q.last_in&FIRST_IN) && qp->q.fragments != NULL) {
+ if ((qp->q.last_in & INET_FRAG_FIRST_IN) && qp->q.fragments != NULL) {
struct sk_buff *head = qp->q.fragments;
struct net *net;
@@ -301,7 +301,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
int ihl, end;
int err = -ENOENT;
- if (qp->q.last_in & COMPLETE)
+ if (qp->q.last_in & INET_FRAG_COMPLETE)
goto err;
if (!(IPCB(skb)->flags & IPSKB_FRAG_COMPLETE) &&
@@ -327,9 +327,9 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
* or have different end, the segment is corrrupted.
*/
if (end < qp->q.len ||
- ((qp->q.last_in & LAST_IN) && end != qp->q.len))
+ ((qp->q.last_in & INET_FRAG_LAST_IN) && end != qp->q.len))
goto err;
- qp->q.last_in |= LAST_IN;
+ qp->q.last_in |= INET_FRAG_LAST_IN;
qp->q.len = end;
} else {
if (end&7) {
@@ -339,7 +339,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
}
if (end > qp->q.len) {
/* Some bits beyond end -> corruption. */
- if (qp->q.last_in & LAST_IN)
+ if (qp->q.last_in & INET_FRAG_LAST_IN)
goto err;
qp->q.len = end;
}
@@ -438,9 +438,10 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
qp->q.meat += skb->len;
atomic_add(skb->truesize, &qp->q.net->mem);
if (offset == 0)
- qp->q.last_in |= FIRST_IN;
+ qp->q.last_in |= INET_FRAG_FIRST_IN;
- if (qp->q.last_in == (FIRST_IN | LAST_IN) && qp->q.meat == qp->q.len)
+ if (qp->q.last_in == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
+ qp->q.meat == qp->q.len)
return ip_frag_reasm(qp, prev, dev);
write_lock(&ip4_frags.lock);