summaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_HMARK.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netfilter/xt_HMARK.c')
-rw-r--r--net/netfilter/xt_HMARK.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_HMARK.c b/net/netfilter/xt_HMARK.c
index 32fbd735d02b..5817d03105b2 100644
--- a/net/netfilter/xt_HMARK.c
+++ b/net/netfilter/xt_HMARK.c
@@ -223,7 +223,7 @@ static int get_inner_hdr(const struct sk_buff *skb, int iphsz, int *nhoff)
/* Not enough header? */
icmph = skb_header_pointer(skb, *nhoff + iphsz, sizeof(_ih), &_ih);
- if (icmph == NULL && icmph->type > NR_ICMP_TYPES)
+ if (icmph == NULL || icmph->type > NR_ICMP_TYPES)
return 0;
/* Error message? */