* [PATCH] IPv6: Fix Length of Authentication Extension Header
@ 2003-01-04 17:48 YOSHIFUJI Hideaki / 吉藤英明
2003-01-06 6:58 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-01-04 17:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: davem, kuznet, usagi
Hello!
This patch fixes calculation of length of IPv6 Authentication Extension
Header.
RFC2402: 2.2 Payload Length
:
This 8-bit field specifies the length of AH in 32-bit words (4-byte
units), minus "2". ...
This is against linux-2.4.20, 2.5.54.
(2.2.x series have similar bug, too.)
Thanks in advance.
-------------------------------------------------------------------
Patch-Name: Fix Length of Authentication Extension Header
Patch-Id: FIX_2_4_20_EXTHDRS_AUTHHDRLEN-20030105
Patch-Author: YOSHIFUJI Hideaki / USAGI Project <yoshfuji@linux-ipv6.org>
Credit: Noriaki Takamiya / USAGI Project <takamiya@linux-ipv6.org>
Reference: RFC2402
-------------------------------------------------------------------
Index: net/ipv6/exthdrs.c
===================================================================
RCS file: /cvsroot/usagi/usagi-backport/linux24/net/ipv6/exthdrs.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.46.1
diff -u -r1.1.1.1 -r1.1.1.1.46.1
--- net/ipv6/exthdrs.c 20 Aug 2002 09:47:02 -0000 1.1.1.1
+++ net/ipv6/exthdrs.c 4 Jan 2003 17:19:03 -0000 1.1.1.1.46.1
@@ -402,7 +402,13 @@
if (!pskb_may_pull(skb, (skb->h.raw-skb->data)+8))
goto fail;
- len = (skb->h.raw[1]+1)<<2;
+ /*
+ * RFC2402 2.2 Payload Length
+ * The 8-bit field specifies the length of AH in 32-bit words
+ * (4-byte units), minus "2".
+ * -- Noriaki Takamiya @USAGI Project
+ */
+ len = (skb->h.raw[1]+2)<<2;
if (len&7)
goto fail;
--
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
* Re: [PATCH] IPv6: Fix Length of Authentication Extension Header
2003-01-04 17:48 [PATCH] IPv6: Fix Length of Authentication Extension Header YOSHIFUJI Hideaki / 吉藤英明
@ 2003-01-06 6:58 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-01-06 6:58 UTC (permalink / raw)
To: yoshfuji; +Cc: linux-kernel, netdev, kuznet, usagi
Patch applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-06 6:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-04 17:48 [PATCH] IPv6: Fix Length of Authentication Extension Header YOSHIFUJI Hideaki / 吉藤英明
2003-01-06 6:58 ` David S. Miller
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).