commit c8b222470a26f6c1234ef23cba6d2ec2519ee8fd Author: Ryota Ozaki Date: Mon Oct 30 18:57:12 2017 +0900 Fix usages of ipsec_used diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 171d550de4d..29115e164d4 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -2012,7 +2012,8 @@ icmp6_rip6_input(struct mbuf **mp, int off) /* * Check AH/ESP integrity */ - if (ipsec_used && !ipsec6_in_reject(m, last)) + if (!ipsec_used || + (ipsec_used && !ipsec6_in_reject(m, last))) #endif /* IPSEC */ if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) { if (last->in6p_flags & IN6P_CONTROLOPTS) diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index c0abc618d12..0bb6f8d3679 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -205,7 +205,8 @@ rip6_input(struct mbuf **mp, int *offp, int proto) /* * Check AH/ESP integrity */ - if (ipsec_used && !ipsec6_in_reject(m, last)) + if (!ipsec_used || + (ipsec_used && !ipsec6_in_reject(m, last))) #endif /* IPSEC */ if ((n = m_copy(m, 0, (int)M_COPYALL)) != NULL) { if (last->in6p_flags & IN6P_CONTROLOPTS)