skb_clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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?


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux