[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>
This commit is contained in:
committed by
David S. Miller
parent
1706d58763
commit
776c729e8d
@@ -172,8 +172,7 @@ int ip_call_ra_chain(struct sk_buff *skb)
|
||||
(!sk->sk_bound_dev_if ||
|
||||
sk->sk_bound_dev_if == skb->dev->ifindex)) {
|
||||
if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
|
||||
skb = ip_defrag(skb, IP_DEFRAG_CALL_RA_CHAIN);
|
||||
if (skb == NULL) {
|
||||
if (ip_defrag(skb, IP_DEFRAG_CALL_RA_CHAIN)) {
|
||||
read_unlock(&ip_ra_lock);
|
||||
return 1;
|
||||
}
|
||||
@@ -265,8 +264,7 @@ int ip_local_deliver(struct sk_buff *skb)
|
||||
*/
|
||||
|
||||
if (ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET)) {
|
||||
skb = ip_defrag(skb, IP_DEFRAG_LOCAL_DELIVER);
|
||||
if (!skb)
|
||||
if (ip_defrag(skb, IP_DEFRAG_LOCAL_DELIVER))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user