]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
SYSRQ: do proper L4 header access in IPv6 code
authorJan Engelhardt <jengelh@medozas.de>
Fri, 27 Mar 2009 19:29:43 +0000 (20:29 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Fri, 27 Mar 2009 20:06:26 +0000 (21:06 +0100)
doc/changelog.txt
extensions/xt_SYSRQ.c

index 2839deea9e9e08cd080d3d4e08002e5b1cfd1aca..5b958c94980c13d0f213c2d5b652afe4fc722794 100644 (file)
@@ -3,6 +3,8 @@
 - fuzzy: need to account for kernel-level modified variables in .userspacesize
 - geoip: remove XT_ALIGN from .userspacesize when used with offsetof
 - SYSRQ: ignore non-UDP packets
+- SYSRQ: do proper L4 header access in IPv6 code
+  (must not use tcp/udp_hdr in input path)
 - add "STEAL" target
 - dhcpmac: rename from dhcpaddr
 
index dc310ee4be1f688307417093691d5f5abbdd6092..2e0e6be97d5ced338a79db008c0e3cd2c75e5c47 100644 (file)
@@ -203,7 +203,7 @@ sysrq_tg4(struct sk_buff **pskb, const struct xt_target_param *par)
        if (iph->protocol != IPPROTO_UDP)
                return NF_ACCEPT; /* sink it */
 
-       udph = (void *)iph + ip_hdrlen(skb);
+       udph = (const void *)iph + ip_hdrlen(skb);
        len  = ntohs(udph->len) - sizeof(struct udphdr);
 
        if (sysrq_debug)
@@ -232,7 +232,7 @@ sysrq_tg6(struct sk_buff **pskb, const struct xt_target_param *par)
            frag_off > 0)
                return NF_ACCEPT; /* sink it */
 
-       udph = udp_hdr(skb);
+       udph = (const void *)iph + th_off;
        len  = ntohs(udph->len) - sizeof(struct udphdr);
 
        if (sysrq_debug)