mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +02:00
SYSRQ: do proper L4 header access in IPv6 code
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user