netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* skb_clone
@ 2005-02-17 10:19 junk
  2005-02-17 13:53 ` skb_clone junk
  0 siblings, 1 reply; 2+ messages in thread
From: junk @ 2005-02-17 10:19 UTC (permalink / raw)
  To: netdev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: skb_clone
  2005-02-17 10:19 skb_clone junk
@ 2005-02-17 13:53 ` junk
  0 siblings, 0 replies; 2+ messages in thread
From: junk @ 2005-02-17 13:53 UTC (permalink / raw)
  To: netdev



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-17 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-17 10:19 skb_clone junk
2005-02-17 13:53 ` skb_clone junk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).