-static struct sk_buff* skb_duplicate(struct sk_buff *skb)
-{
- struct sk_buff *new_skb;
-
- new_skb = alloc_skb_tx(skb->len);
- if ( new_skb == NULL )
- return NULL;
-
- skb_put(new_skb, skb->len);
- memcpy(new_skb->data, skb->data, skb->len);
-
- return new_skb;
-}
-
-static struct sk_buff* skb_break_away_from_protocol(struct sk_buff *skb)
-{
- struct sk_buff *new_skb;
-
- if ( skb_shared(skb) ) {
- new_skb = skb_clone(skb, GFP_ATOMIC);
- if ( new_skb == NULL )
- return NULL;
- } else
- new_skb = skb_get(skb);
-
- skb_dst_drop(new_skb);
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
- nf_conntrack_put(new_skb->nfct);
- new_skb->nfct = NULL;
- #ifdef CONFIG_BRIDGE_NETFILTER
- nf_bridge_put(new_skb->nf_bridge);
- new_skb->nf_bridge = NULL;
- #endif
-#endif
-
- return new_skb;
-}
-