summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_fragment.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-14 00:38:32 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-15 12:26:25 -0700
commit776c729e8d91b2740583a2169678f2d3f383458b (patch)
tree16ad06616e8d04c127266bf323fb35fbed03b96d /net/ipv4/ip_fragment.c
parent1706d58763c36133d7fce6cc78b1444fd40db28c (diff)
downloadlinux-776c729e8d91b2740583a2169678f2d3f383458b.tar.gz
linux-776c729e8d91b2740583a2169678f2d3f383458b.tar.bz2
linux-776c729e8d91b2740583a2169678f2d3f383458b.zip
[IPV4]: Change ip_defrag to return an integer
Now that ip_frag always returns the packet given to it on input, we can change it to return an integer indicating error instead. This patch does that and updates all its callers accordingly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_fragment.c')
-rw-r--r--net/ipv4/ip_fragment.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index d7fa2bf3a0c1..32108cf2a784 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -739,7 +739,7 @@ out_fail:
}
/* Process an incoming IP datagram fragment. */
-struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user)
+int ip_defrag(struct sk_buff *skb, u32 user)
{
struct ipq *qp;
@@ -759,12 +759,12 @@ struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user)
spin_unlock(&qp->lock);
ipq_put(qp, NULL);
- return ret ? NULL : skb;
+ return ret;
}
IP_INC_STATS_BH(IPSTATS_MIB_REASMFAILS);
kfree_skb(skb);
- return NULL;
+ return -ENOMEM;
}
void __init ipfrag_init(void)