xt_SYSRQ: fix UDPLITE header lookup in IPv6

This commit is contained in:
Jan Engelhardt
2011-08-12 15:44:27 +02:00
parent 04aed87cb6
commit c2d93e16fd
2 changed files with 3 additions and 1 deletions

View File

@@ -244,7 +244,8 @@ sysrq_tg6(struct sk_buff **pskb, const struct xt_action_param *par)
return NF_DROP;
iph = ipv6_hdr(skb);
if (ipv6_find_hdr(skb, &th_off, IPPROTO_UDP, &frag_off) < 0 ||
if ((ipv6_find_hdr(skb, &th_off, IPPROTO_UDP, &frag_off) < 0 &&
ipv6_find_hdr(skb, &th_off, IPPROTO_UDPLITE, &frag_off) < 0) ||
frag_off > 0)
return NF_DROP;