HomeFreeBSD

libpfctl: improve syncookie watermark calculation

Description

libpfctl: improve syncookie watermark calculation

Ensure that we always pass sane limits for the high and low watermark
values.
This is especially important if users do something silly, like set the
state limit to 1. In that case we wound up calculating 0/0 as a limit,
which gets rejected by the kernel.

While here also shift the calculation to use uint64_t, so we don't end
up with overflows (and subsequently higher low than high values) with
very large state limits.

Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D36497

Details

Provenance
kpAuthored on Sep 8 2022, 4:32 PM
Differential Revision
D36497: libpfctl: improve syncookie watermark calculation
Parents
rG7d0e83c60bed: arm: add dwc3/xhci as build options for ARM
Branches
Unknown
Tags
Unknown