|
@@ -108,10 +108,12 @@ struct sock *nf_sk_lookup_slow_v4(struct net *net, const struct sk_buff *skb,
|
|
int doff = 0;
|
|
int doff = 0;
|
|
|
|
|
|
if (iph->protocol == IPPROTO_UDP || iph->protocol == IPPROTO_TCP) {
|
|
if (iph->protocol == IPPROTO_UDP || iph->protocol == IPPROTO_TCP) {
|
|
- struct udphdr _hdr, *hp;
|
|
|
|
|
|
+ struct tcphdr _hdr;
|
|
|
|
+ struct udphdr *hp;
|
|
|
|
|
|
hp = skb_header_pointer(skb, ip_hdrlen(skb),
|
|
hp = skb_header_pointer(skb, ip_hdrlen(skb),
|
|
- sizeof(_hdr), &_hdr);
|
|
|
|
|
|
+ iph->protocol == IPPROTO_UDP ?
|
|
|
|
+ sizeof(*hp) : sizeof(_hdr), &_hdr);
|
|
if (hp == NULL)
|
|
if (hp == NULL)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|