netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IPv6 auth header length calculation patch
@ 2003-01-04 16:03 Kunihiro Ishiguro
  2003-01-04 17:05 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 2+ messages in thread
From: Kunihiro Ishiguro @ 2003-01-04 16:03 UTC (permalink / raw)
  To: netdev; +Cc: yoshfuji

[-- 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;

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

* Re: IPv6 auth header length calculation patch
  2003-01-04 16:03 IPv6 auth header length calculation patch Kunihiro Ishiguro
@ 2003-01-04 17:05 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 0 replies; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-01-04 17:05 UTC (permalink / raw)
  To: netdev

In article <873co8dhr2.wl@ipinfusion.com> (at Sat, 04 Jan 2003 08:03:45 -0800), Kunihiro Ishiguro <kunihiro@ipinfusion.com> says:

> 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).
:
> Would you mind to apply this to avoid wrong header length calculation?

Just a moment please.  
We'll make a patch for this by ourselves.

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

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

end of thread, other threads:[~2003-01-04 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-04 16:03 IPv6 auth header length calculation patch Kunihiro Ishiguro
2003-01-04 17:05 ` YOSHIFUJI Hideaki / 吉藤英明

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