| To: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: pskb change in dst->output |
| From: | James Morris <jmorris@xxxxxxxxxx> |
| Date: | Wed, 7 Jul 2004 23:34:59 -0400 (EDT) |
| Cc: | "David S. Miller" <davem@xxxxxxxxxx>, <netdev@xxxxxxxxxxx> |
| In-reply-to: | <20040708011100.GA31600@gondor.apana.org.au> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Thu, 8 Jul 2004, Herbert Xu wrote:
> I'm just a bit unsure whether the pskb change is needed in dst_output().
Ok, dst_output() iterates over the skb->dst stack:
for (;;) {
err = skb->dst->output(&skb);
if (likely(err == 0))
return err;
if (unlikely(err != NET_XMIT_BYPASS))
return err;
}
We need to pass a pointer to skb to skb->dst->output() because the skb can
be changed by skb_checksum_help() in one of these output paths. Further
iteration would otherwise pass an incorrect (freed) skb.
The change to dst->output() which implements a double skb pointer is then
propagated throughout the code, e.g. ah_output() has to change because it
becomes an output function via xfrm->type->output().
- James
--
James Morris
<jmorris@xxxxxxxxxx>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: preliminary conclusions regarding window size issues, Jamie Lokier |
|---|---|
| Next by Date: | Re: pskb change in dst->output, Herbert Xu |
| Previous by Thread: | Re: pskb change in dst->output, James Morris |
| Next by Thread: | Re: pskb change in dst->output, Herbert Xu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |