patch-2.4.21 linux-2.4.21/net/ipv6/exthdrs.c

Next file: linux-2.4.21/net/ipv6/icmp.c
Previous file: linux-2.4.21/net/ipv6/datagram.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/net/ipv6/exthdrs.c linux-2.4.21/net/ipv6/exthdrs.c
@@ -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;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)