* Check IPv4 packet against *INBOUND* security policy. * This function is called from tcp_input(), udp_input(), * rip_input() and sctp_input(). */
| 630 | * rip_input() and sctp_input(). |
| 631 | */ |
| 632 | int |
| 633 | ipsec4_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. |
no test coverage detected