HomeFreeBSD

MFC r311679:

Description

MFC r311679:

Add direction argument to ipsec_setspidx_inpcb() function.

This function is used only by ipsec_getpolicybysock() to fill security
policy index selector for locally generated packets (that have INPCB).
The function incorrectly assumes that spidx is the same for both directions.
Fix this by using new direction argument to specify correct INPCB security
policy - sp_in or sp_out. There is no need to fill both policy indeces,
because they are overwritten for each packet.
This fixes security policy matching for outbound packets when user has
specified TCP/UDP ports in the security policy upperspec.

PR:		[[ https://bugs.freebsd.org/213869 | 213869 ]]

Details

Provenance
aeAuthored on
Parents
rS312232: Add under-/overrun support to IOCTL and CAM SIM frontends.
Branches
Unknown
Tags
Unknown