* IPSEC_CAP() method implementation for IPv6. */
| 816 | * IPSEC_CAP() method implementation for IPv6. |
| 817 | */ |
| 818 | int |
| 819 | ipsec6_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 | |
| 843 | int |
nothing calls this directly
no test coverage detected