Networking Forums

Networking Forums > Computer Networking > Linux Networking > problems with sk_buff implementation

Reply
Thread Tools Display Modes

problems with sk_buff implementation

 
 
Venu
Guest
Posts: n/a

 
      06-24-2004, 02:59 AM
Hi all,

I need to create sk_buff packets in my driver and send it up to the
host that reads from a raw socket and does some processing. But when I
do this - the kernel "Oops" crashes. in fact, it's somewhere in the
free routines.


my code snippet is below

void fn(struct sk_buff ** sk)
{
.....
n = sizeof(assoc);
*sk = dev_alloc_skb(n + 1);
data = skb_put(*sk,n);
memcpy(data, &assoc,n);
(*sk)->len = n;
... <snip>
}


the function takes in a sk_buf **, assoc is a char buffer that needs
to be copied to the skb->data area.

I see that the skb construction is fine, it passes all the way up the
app routine, but then the kernel crashes (presumably in free routines,
I checked with ksymoops)

Anyone have an insight into what I could be doing wrong? am I missing
something? Answers greatly appreciated. Direct responses are better -
please mail to
n e c r o m o n g e r AT g m a i l DOT c o m. (I don't check the yahoo
acct - it's spam infested)

thanks much!
-m
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
obtain ARP header from 'sk_buff' Mark Linux Networking 0 10-07-2010 09:16 AM
sk_buff & DMA Bill Linux Networking 2 04-23-2008 07:36 AM
802.11i implementation Arsene Wireless Networks 7 01-21-2008 08:39 PM
How to send a tcp packet to same machine from a kernel module by creating a sk_buff struct will_u_tellmemore Linux Networking 0 01-11-2007 12:45 PM
how to construct the sk_buff structure by myself? fangweiwei Linux Networking 0 02-17-2004 10:13 AM



1 2 3 4 5 6 7 8 9 10 11