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

Function ipsec4_forward

freebsd/netipsec/ipsec_output.c:391–404  ·  view source on GitHub ↗

* IPSEC_FORWARD() method implementation for IPv4. * 0 - no IPsec handling needed * other values - mbuf consumed by IPsec. */

Source from the content-addressed store, hash-verified

389 * other values - mbuf consumed by IPsec.
390 */
391int
392ipsec4_forward(struct mbuf *m)
393{
394
395 /*
396 * Check if this packet has an active inbound SP and needs to be
397 * dropped instead of forwarded.
398 */
399 if (ipsec4_in_reject(m, NULL) != 0) {
400 m_freem(m);
401 return (EACCES);
402 }
403 return (ipsec4_common_output(m, NULL, 1));
404}
405#endif
406
407#ifdef INET6

Callers

nothing calls this directly

Calls 3

ipsec4_in_rejectFunction · 0.85
ipsec4_common_outputFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected