udp packets cause kernel oops in ip_push_pending_frames linux

view full story

http://www.linuxquestions.org – I have a kernel module that uses netfilter to catch the packets at NF_IP_LOCAL_OUT hook.These are udp packets which encapsulate tcp packets withing them like ip->udp->ip'->tcp. In the hook, I strip the ip and udp header out to recover the ip->tcp original packet.Sometimes , I get this message. ip_push_pending_frames+0x38b/0x46c To strip the headers I do, skb->data=skb->data+iph->ihl*4+sizeof(struct udphdr); skb->network_header=skb->data; skb->transport_header=skb->data+iph->ihl*4; skb->len=ntohs(((struct iphdr*)skb->network_header)->tot_len); skb->tail=skb->data+skb->len; and it kills my process but I have a watchdog to restart it. Any ideas on how to prevent this ? This is very important for me. Thank you advanced (HowTos)