MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ipsec6_capability

Function ipsec6_capability

freebsd/netipsec/ipsec.c:818–840  ·  view source on GitHub ↗

* IPSEC_CAP() method implementation for IPv6. */

Source from the content-addressed store, hash-verified

816 * IPSEC_CAP() method implementation for IPv6.
817 */
818int
819ipsec6_capability(struct mbuf *m, u_int cap)
820{
821
822 switch (cap) {
823 case IPSEC_CAP_BYPASS_FILTER:
824 /*
825 * Bypass packet filtering for packets previously handled
826 * by IPsec.
827 */
828 if (!V_ip6_filtertunnel &&
829 m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL)
830 return (1);
831 return (0);
832 case IPSEC_CAP_OPERABLE:
833 /* Do we have active security policies? */
834 if (key_havesp(IPSEC_DIR_INBOUND) != 0 ||
835 key_havesp(IPSEC_DIR_OUTBOUND) != 0)
836 return (1);
837 return (0);
838 };
839 return (EOPNOTSUPP);
840}
841#endif /* INET6 */
842
843int

Callers

nothing calls this directly

Calls 2

key_havespFunction · 0.85
m_tag_findFunction · 0.50

Tested by

no test coverage detected