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

Function ipsec4_in_reject

freebsd/netipsec/ipsec.c:632–644  ·  view source on GitHub ↗

* Check IPv4 packet against *INBOUND* security policy. * This function is called from tcp_input(), udp_input(), * rip_input() and sctp_input(). */

Source from the content-addressed store, hash-verified

630 * rip_input() and sctp_input().
631 */
632int
633ipsec4_in_reject(const struct mbuf *m, struct inpcb *inp)
634{
635 struct secpolicy *sp;
636 int result;
637
638 sp = ipsec4_getpolicy(m, inp, IPSEC_DIR_INBOUND, 0);
639 result = ipsec_in_reject(sp, inp, m);
640 key_freesp(&sp);
641 if (result != 0)
642 IPSECSTAT_INC(ips_in_polvio);
643 return (result);
644}
645
646/*
647 * IPSEC_CAP() method implementation for IPv4.

Callers 2

ipsec4_inputFunction · 0.85
ipsec4_forwardFunction · 0.85

Calls 3

ipsec4_getpolicyFunction · 0.85
ipsec_in_rejectFunction · 0.85
key_freespFunction · 0.85

Tested by

no test coverage detected