summaryrefslogtreecommitdiff
path: root/net/ipv6/netfilter/ip6t_hbh.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/netfilter/ip6t_hbh.c')
-rw-r--r--net/ipv6/netfilter/ip6t_hbh.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c
index 37a8474a7e0c..af56eafd4a46 100644
--- a/net/ipv6/netfilter/ip6t_hbh.c
+++ b/net/ipv6/netfilter/ip6t_hbh.c
@@ -69,13 +69,18 @@ match(const struct sk_buff *skb,
u8 _opttype, *tp = NULL;
u8 _optlen, *lp = NULL;
unsigned int optlen;
+ int err;
#if HOPBYHOP
- if (ipv6_find_hdr(skb, &ptr, NEXTHDR_HOP, NULL) < 0)
+ err = ipv6_find_hdr(skb, &ptr, NEXTHDR_HOP, NULL);
#else
- if (ipv6_find_hdr(skb, &ptr, NEXTHDR_DEST, NULL) < 0)
+ err = ipv6_find_hdr(skb, &ptr, NEXTHDR_DEST, NULL);
#endif
+ if (err < 0) {
+ if (err != -ENOENT)
+ *hotdrop = 1;
return 0;
+ }
oh = skb_header_pointer(skb, ptr, sizeof(_optsh), &_optsh);
if (oh == NULL) {