HomeFreeBSD

ipfilter: Use the softn (NAT softc) host map size in ip_nat6 calculation.

Description

ipfilter: Use the softn (NAT softc) host map size in ip_nat6 calculation.

The ipfilter NAT table host map size is a tunable that defaults to
a macro value defined at build time. HOSTMAP_SIZE is saved in softn
(the ipnat softc) at initialization. It can be tuned (changed) at runtime
using the ipf -T command. If the hostmap_size tunable is adjusted the
calculation to determine where to put new entries in the table was
incorrect. Use the tunable in the NAT softc instead of the static build
time value.

MFC after: 1 week

Details

Provenance
cyAuthored on Feb 5 2021, 2:26 PM
Parents
rG10990cb46027: Simplify FreeBSD check.
Branches
Unknown
Tags
Unknown