diff options
Diffstat (limited to 'net/ipv6/netfilter/ip6t_dst.c')
-rw-r--r-- | net/ipv6/netfilter/ip6t_dst.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/ip6t_dst.c b/net/ipv6/netfilter/ip6t_dst.c index b4c153a53500..244122820028 100644 --- a/net/ipv6/netfilter/ip6t_dst.c +++ b/net/ipv6/netfilter/ip6t_dst.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) { |