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

Next file: linux-2.4.22/net/ipv6/ip6_fib.c
Previous file: linux-2.4.22/net/ipv6/anycast.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/net/ipv6/exthdrs.c linux-2.4.22/net/ipv6/exthdrs.c
@@ -235,8 +235,13 @@
 		return (&hdr->nexthdr) - skb->nh.raw;
 	}
 
-	if (hdr->type != IPV6_SRCRT_TYPE_0 || (hdr->hdrlen & 0x01)) {
-		icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, hdr->type != IPV6_SRCRT_TYPE_0 ? 2 : 1);
+	if (hdr->type != IPV6_SRCRT_TYPE_0) {
+		icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, (&hdr->type) - skb->nh.raw);
+		return -1;
+	}
+	
+	if (hdr->hdrlen & 0x01) {
+		icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, (&hdr->hdrlen) - skb->nh.raw);
 		return -1;
 	}
 

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