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

Function ipsec_kmod_capability

freebsd/netipsec/subr_ipsec.c:384–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382)
383
384static IPSEC_KMOD_METHOD(int, ipsec_kmod_caps, sc,
385 capability, METHOD_DECL(struct ipsec_support * const sc, struct mbuf *m,
386 u_int cap), METHOD_ARGS(m, cap)
387)
388
389int
390ipsec_kmod_capability(struct ipsec_support * const sc, struct mbuf *m,
391 u_int cap)
392{
393
394 /*
395 * Since PF_KEY is build in the kernel, we can directly
396 * call key_havesp() without additional synchronizations.
397 */
398 if (cap == IPSEC_CAP_OPERABLE)
399 return (key_havesp(IPSEC_DIR_INBOUND) != 0 ||
400 key_havesp(IPSEC_DIR_OUTBOUND) != 0);
401 return (ipsec_kmod_caps(sc, m, cap));
402}
403
404void
405ipsec_support_enable(struct ipsec_support * const sc,

Callers

nothing calls this directly

Calls 1

key_havespFunction · 0.85

Tested by

no test coverage detected