diff options
author | Gaurav Singh <gaurav1086@gmail.com> | 2020-07-26 21:52:05 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-07-29 20:39:43 +0200 |
commit | 42f36eba71c4f0c532d6de761c154d00f9f1900d (patch) | |
tree | 76e3066bb677be07143c1831c23e5e7b0acaf5b2 /net/ipv6/netfilter/ip6t_ah.c | |
parent | netfilter: Replace HTTP links with HTTPS ones (diff) | |
download | linux-dev-42f36eba71c4f0c532d6de761c154d00f9f1900d.tar.xz linux-dev-42f36eba71c4f0c532d6de761c154d00f9f1900d.zip |
netfilter: ip6tables: Remove redundant null checks
Remove superfluous check for NULL pointer to header.
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/ip6t_ah.c')
-rw-r--r-- | net/ipv6/netfilter/ip6t_ah.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/ip6t_ah.c b/net/ipv6/netfilter/ip6t_ah.c index 4e15a14435e4..70da2f2ce064 100644 --- a/net/ipv6/netfilter/ip6t_ah.c +++ b/net/ipv6/netfilter/ip6t_ah.c @@ -74,8 +74,7 @@ static bool ah_mt6(const struct sk_buff *skb, struct xt_action_param *par) ahinfo->hdrres, ah->reserved, !(ahinfo->hdrres && ah->reserved)); - return (ah != NULL) && - spi_match(ahinfo->spis[0], ahinfo->spis[1], + return spi_match(ahinfo->spis[0], ahinfo->spis[1], ntohl(ah->spi), !!(ahinfo->invflags & IP6T_AH_INV_SPI)) && (!ahinfo->hdrlen || |