netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "junk" <junk@toutatis.be>
To: netdev@oss.sgi.com
Subject: Re: skb_clone
Date: Thu, 17 Feb 2005 14:53:11 +0100	[thread overview]
Message-ID: <20050217134407.M46105@toutatis.be> (raw)
In-Reply-To: <20050217101331.M38167@toutatis.be>



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

      reply	other threads:[~2005-02-17 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17 10:19 skb_clone junk
2005-02-17 13:53 ` junk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050217134407.M46105@toutatis.be \
    --to=junk@toutatis.be \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).