|
@@ -116,9 +116,11 @@ struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,
|
|
|
}
|
|
|
|
|
|
if (tproto == IPPROTO_UDP || tproto == IPPROTO_TCP) {
|
|
|
- struct udphdr _hdr, *hp;
|
|
|
+ struct tcphdr _hdr;
|
|
|
+ struct udphdr *hp;
|
|
|
|
|
|
- hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr);
|
|
|
+ hp = skb_header_pointer(skb, thoff, tproto == IPPROTO_UDP ?
|
|
|
+ sizeof(*hp) : sizeof(_hdr), &_hdr);
|
|
|
if (hp == NULL)
|
|
|
return NULL;
|
|
|
|