Does anyone recall any special rules for dealing with the function? I
had a function that sent fake arp packets back working, but now I've
apparently got a mess.
If I allow that function to be executed rather than commenting it out I
goet a DEBUG_PAGEALLOC error. (Almost all the kernel debugging routines
are enabled.)
Basically what i'm doing for right now is the following.
in orinoco_xmit()
1) Find out if its a broadcast packet.
2) If so is it an arp packet? If its an arp packet, is it an arp
request packet? If so do the following.
(This is a simplified version.)
struct sk_buff * skb_out = dev_alloc_skb( 28 ) ;
/* Packet structure is as follows. I create a struct that has all this
with the packed attribute and set all the field correctly. */
memcpy(skb_put(skb_out,28),&mystruct,28);
/* Format of resulting skb */
[8 byte arp response header][sender mac][sender
ipv4][targetmac][targetipv4]
I set the protocol and ip_summed as follows.
skb_resp->protocol=ntohs(ETH_P_ARP); //network to host byte order
skb_resp->ip_summed = CHECKSUM_NONE;
And then do a
netif_rx(skb_out)
making sure not to clear it since other code does that..
Am I missing something obvious?
If I leave netif_rx not commented out things rapidly crash as soon as I
do a ping (The EIP is at netif_rx if that helps.), yet if i do a dump of
that skb the packet looks fine and is 28 bytes in length. (It has no
ethernet header, but then it shouldn't need one right?)
I can post the actually source code I'm working on if it will help.
-thanks,
-Robert
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
|