HomeFreeBSD

pfctl: Zap bits in host_v4(), use mask parameter

Description

pfctl: Zap bits in host_v4(), use mask parameter

This avoids a duplicate strrchr() call and makes the function consistent
with host_v6() regarding mask handling.

While here, use the destination's size in memcpy instead of hardcoding its
type.

OK sashan

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

Details

Provenance
kpAuthored on Jun 27 2025, 12:17 PM
Parents
rGa59e7964d58a: pfctl: Zap v4mask and v6mask in host()
Branches
Unknown
Tags
Unknown