Skip to contentSkip to conversation

skb_clone

DISCUSSION junk 1 participant 2 messages Feb 17, 2005

Subsystems (2)
lore
Share & tools
lore

junk

author
#0 lore raw

Hello,

i made a clone of a skb i catched with a netfilter hook.

Now i want to send that cloned skb on the wire.. what should i do? I tried with dev_queue_xmit without success..

author
#1 lore raw
Quoted 8 lines

Hello,

i made a clone of a skb i catched with a netfilter hook.

Now i want to send that cloned skb on the wire.. what should i do? I tried with dev_queue_xmit without success..

I've been able to transmit my packet.. no more kernel oops but it seems i'm having an alignment problem. Tcpdump tells me "ethertype unknown" on each packet that has been altered by my module. That packet originally comes from "ping", I do not generate it myself, so i guess the ethernet header, IP header, data are correct. It just seems I missed a point before dev_queue_xmit() my skb.

I'm having the same problem if I skb_copy() instead of skb_clone() the original skb.

Here is a summary of my code:

hook_interrupt -> cloning skb to new_skb -> changing new_skb->dev to another interface -> dev_queue_xmit(new_skb); -> return NF_STOLEN for the original skb

What am I missing?