Skip to contentSkip to conversation

IPv6 auth header length calculation patch

PATCH Kunihiro Ishiguro 2 participants 2 messages Jan 4, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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?

exthdrs.c renamed from exthdrs.c.orig +1 -1
@@ -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;
#1 lore raw

In article <[email protected]> (at Sat, 04 Jan 2003 08:03:45 -0800), Kunihiro Ishiguro <[email protected]> says:

Quoted 3 lines

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

:

Quoted 1 line

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.

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA