HomeFreeBSD

pf: fix pf_map_addr() not to cause dividing by 0

Description

pf: fix pf_map_addr() not to cause dividing by 0

This fixes problem when using table or dynamic interface addresses for
source-hash. Also avoid calling arc4random_uniform() with upper_bound == 0.

ok mikeb

Obtained from: OpenBSD, yasuoka <yasuoka@openbsd.org>, c30ec822b8
Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on Feb 28 2025, 2:58 PM
Parents
rG8a2c189e8938: ports.7/history: Don't forget macOS!
Branches
Unknown
Tags
Unknown