hi,everyone, how to deal with freeing sk_buff in hard_start_xmit() function??

Submitted by sunbird
on June 13, 2006 - 2:18am

I want to deal with every ipv6 packet passing the net device. So i changed the pointer of the hard_start_xmit(struct sk_buff *skb,struct net_device *dev) to my own function my_function, and in the last of my function I call the original function hard_start_xmit to translate the skb1 which is maked in my function . In my funtion i will make a new sk_buff skb1 base on the skb which comes from the up protocol such as ipv6/ipv4. when i have the done the skb1, i free the original skb,but my computer can`t work and die out. I know the reason is the sentence "kfree_skb(skb);" . Although i know the reason, i can`t resolve this ,because i must free the skb which came from up protocol . DO you know how to free the skb which came from the up protocol and sent my own skb1??