SYSRQ: do proper L4 header access in IPv6 code

This commit is contained in:
Jan Engelhardt
2009-03-27 20:29:43 +01:00
parent beb7546e20
commit ba6aa51f91
2 changed files with 4 additions and 2 deletions

View 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

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