datapath/linux/compat/ip_fragment.c
/* Process an incoming IP datagram fragment. */
Process an incoming IP datagram fragment.
Process an incoming IP datagram fragment .
int rpl_ip_defrag(struct net *net, struct sk_buff *skb, u32 user)
{
	struct net_device *dev = skb->dev ? : skb_dst(skb)->dev;
	int vif = vrf_master_ifindex_rcu(dev);
	struct ipq *qp;
	IP_INC_STATS_BH(net, IPSTATS_MIB_REASMREQDS);
	skb_orphan(skb);
#ifdef HAVE_INET_FRAG_EVICTOR
	ip_evictor(net);
#endif
	qp = ip_find(net, ip_hdr(skb), user, vif);
	if (qp) {
		int ret;
		spin_lock(&qp->q.lock);
		ret = ip_frag_queue(qp, skb);
		spin_unlock(&qp->q.lock);
		ipq_put(qp);
		return ret;
	}
	IP_INC_STATS_BH(net, IPSTATS_MIB_REASMFAILS);
	kfree_skb(skb);
	return -ENOMEM;
}
int rpl_ip_defrag ( struct net * net , struct sk_buff * skb , u32 user ) { struct net_device * dev = skb -> dev ? : skb_dst ( skb ) -> dev ; int vif = vrf_master_ifindex_rcu ( dev ) ; struct ipq * qp ; IP_INC_STATS_BH ( net , IPSTATS_MIB_REASMREQDS ) ; skb_orphan ( skb ) ; #ifdef HAVE_INET_FRAG_EVICTOR ip_evictor ( net ) ; #endif qp = ip_find ( net , ip_hdr ( skb ) , user , vif ) ; if ( qp ) { int ret ; spin_lock ( & qp -> q . lock ) ; ret = ip_frag_queue ( qp , skb ) ; spin_unlock ( & qp -> q . lock ) ; ipq_put ( qp ) ; return ret ; } IP_INC_STATS_BH ( net , IPSTATS_MIB_REASMFAILS ) ; kfree_skb ( skb ) ; return - ENOMEM ; }
Process an incoming IP datagram fragment.
Process an incoming IP datagram fragment .
/* Start by cleaning up the memory. */ /* Lookup (or create) queue header */