diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2024-12-29 07:12:26 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2025-01-13 19:29:32 +0000 |
| commit | 0ff2d00d2aa37cd883ffd8c7363dddef9cba267e (patch) | |
| tree | f2907311f4ad3bf405f3549722286463ab6b760a /sys/netipsec/ipsec_support.h | |
| parent | b0e020764aae970545357b0f146dcba7b4b55864 (diff) | |
ipsec: allow it to work with unmapped mbufs
Only map mbuf when a policy is looked up and indicates that IPSEC needs
to transform the packet. If IPSEC is inline offloaded, it is up to the
interface driver to request remap if needed.
Fetch the IP header using m_copydata() instead of using mtod() to select
policy/SA.
Reviewed by: markj
Sponsored by: NVidia networking
Differential revision: https://reviews.freebsd.org/D48265
Diffstat (limited to 'sys/netipsec/ipsec_support.h')
| -rw-r--r-- | sys/netipsec/ipsec_support.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netipsec/ipsec_support.h b/sys/netipsec/ipsec_support.h index 0cbfe6ddfee5..26f5e8a82d87 100644 --- a/sys/netipsec/ipsec_support.h +++ b/sys/netipsec/ipsec_support.h @@ -30,6 +30,7 @@ #ifdef _KERNEL #if defined(IPSEC) || defined(IPSEC_SUPPORT) struct ifnet; +struct ip; struct mbuf; struct inpcb; struct tcphdr; @@ -56,6 +57,7 @@ int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *); #endif #ifdef INET int ipsec4_in_reject(const struct mbuf *, struct inpcb *); +int ipsec4_in_reject1(const struct mbuf *m, struct ip *ip1, struct inpcb *inp); int ipsec4_input(struct mbuf *, int, int); int ipsec4_forward(struct mbuf *); int ipsec4_pcbctl(struct inpcb *, struct sockopt *); |
