netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Philippe Andriot <jean-philippe.andriot@6WIND.com>
To: netdev@vger.kernel.org
Subject: [PATCH] [XFRM/IPV6] fix next header offset in decode_session
Date: Tue, 7 Nov 2006 10:30:02 +0100	[thread overview]
Message-ID: <20061107093002.GA6576@palpatine.dev.6wind.com> (raw)


The way to get the next protocol number of an IPv6 tunnel changes
after introducing IP6CB, but I think we should go back to the
previous version here.
In our case I think there was a confusion between the pointer
on the first byte of the next header and the value of the next
header field.

Signed-off-by: Andriot Jean-Philippe <jean-philippe.andriot@6wind.com>

--- xfrm6_policy.c.org  2006-11-07 09:45:47.000000000 +0100
+++ xfrm6_policy.c      2006-11-07 09:46:19.000000000 +0100
@@ -255,7 +255,7 @@ _decode_session6(struct sk_buff *skb, st
        u16 offset = skb->h.raw - skb->nh.raw;
        struct ipv6hdr *hdr = skb->nh.ipv6h;
        struct ipv6_opt_hdr *exthdr;
-       u8 nexthdr = skb->nh.raw[IP6CB(skb)->nhoff];
+       u8 nexthdr = skb->nh.ipv6h->nexthdr;
 
        memset(fl, 0, sizeof(struct flowi));
        ipv6_addr_copy(&fl->fl6_dst, &hdr->daddr);


             reply	other threads:[~2006-11-07  9:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-07  9:30 Jean-Philippe Andriot [this message]
2006-11-07  9:48 ` [PATCH] [XFRM/IPV6] fix next header offset in decode_session YOSHIFUJI Hideaki / 吉藤英明

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=20061107093002.GA6576@palpatine.dev.6wind.com \
    --to=jean-philippe.andriot@6wind.com \
    --cc=netdev@vger.kernel.org \
    /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).