netfilter6 ip6_packet_match doesn't properly skip exthdrs
Subsystems (3)
PATCH 1/1 netfilter6 ip6_packet_match doesn't properly skip exthdrs
This patch fixes a bug in the ip6_tables code that tries to skip extension headers. Packets with extension headers were usually not matched because the code was looking at the wrong offset inside the skb.
Signed-off-by Olaf Kirch <[email protected]>
net/ipv6/netfilter/ip6_tables.c +1 -1
@@ -219,7 +219,7 @@u_int16_t ptr;/* Header offset in skb */ u_int16_t hdrlen;/* Header */ - ptr =IPV6_HDR_LEN ; + ptr = ((char *) ipv6 - (char *) skb->data) +IPV6_HDR_LEN ;while (ip6t_ext_hdr (currenthdr)) {/* Is there enough space for the next ext header? */
Signature · 3 lines
Olaf Kirch | Things that make Monday morning interesting, #1: [email protected] | "I want to use NFS over AX25, can you help me?" ---------------+