LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-08-2010, 05:09 PM   #1
bugsmakemylifehell
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
Unhappy udp packets cause kernel oops in ip_push_pending_frames linux 2.6.23.5


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
 
Old 03-02-2010, 05:46 AM   #2
arklip
LQ Newbie
 
Registered: Dec 2009
Location: Israel
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by bugsmakemylifehell View Post
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
OK, I think, that you tried to access to unmapped space.
As you know only part of original packet may be placed in
skb->data, the rest is in scatter-gather list. So you have to check:
1. where a requested data is placed
2. map s-g page to linear space
3. access to needed offset.

I will be glad to help you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tell whether kernel is dropping UDP packets (or size of used receive buffer)? igorlord Linux - Kernel 2 10-15-2009 09:26 AM
udp packets chronos3k Linux - Newbie 2 03-13-2008 06:19 AM
UDP: Short Packets: and UDP bad checksum: entries in dmesg minutes2memories Linux - Networking 2 02-26-2006 08:28 PM
encapsulating TCP packets in UDP packets... yoshi95 Programming 3 06-03-2004 03:53 PM
How to receive UDP and ICMP packets, by one UDP socket(PMTUD) myself_rajat Linux - Networking 0 05-28-2004 06:43 AM


All times are GMT -5. The time now is 10:03 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration