From: Kunihiro Ishiguro <kunihiro@ipinfusion.com>
To: netdev@oss.sgi.com
Cc: yoshfuji@linux-ipv6.org
Subject: IPv6 auth header length calculation patch
Date: Sat, 04 Jan 2003 08:03:45 -0800 [thread overview]
Message-ID: <873co8dhr2.wl@ipinfusion.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
This is a USAGI patch to fix IPv6 auth header length calculation.
(I'm not USAGI member. I'm working on IPv6 IPsec based on 2.5 code
base).
RFC2402 2.2 Payload Length
:
This 8-bit field specifies the length of AH in 32-bit words (4-byte
units), minus "2". (All IPv6 extension headers, as per RFC 1883,
encode the "Hdr Ext Len" field by first subtracting 1 (64-bit word)
from the header length (measured in 64-bit words). AH is an IPv6
extension header. However, since its length is measured in 32-bit
words, the "Payload Length" is calculated by subtracting 2 (32 bit
words).) In the "standard" case of a 96-bit authentication value
Would you mind to apply this to avoid wrong header length calculation?
[-- Attachment #2: ipv6-auth-hdr-length.diff --]
[-- Type: application/octet-stream, Size: 283 bytes --]
--- exthdrs.c.orig 2003-01-04 07:59:31.000000000 -0800
+++ exthdrs.c 2003-01-04 07:59:41.000000000 -0800
@@ -402,7 +402,7 @@
if (!pskb_may_pull(skb, (skb->h.raw-skb->data)+8))
goto fail;
- len = (skb->h.raw[1]+1)<<2;
+ len = (skb->h.raw[1]+2)<<2;
if (len&7)
goto fail;
next reply other threads:[~2003-01-04 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-04 16:03 Kunihiro Ishiguro [this message]
2003-01-04 17:05 ` IPv6 auth header length calculation patch 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=873co8dhr2.wl@ipinfusion.com \
--to=kunihiro@ipinfusion.com \
--cc=netdev@oss.sgi.com \
--cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.