Page MenuHomeFreeBSD

pf: remove switch (af) default cases
ClosedPublic

Authored by kp on Oct 4 2024, 12:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 28 2025, 7:42 PM
Unknown Object (File)
Feb 25 2025, 2:35 PM
Unknown Object (File)
Feb 14 2025, 10:54 PM
Unknown Object (File)
Feb 9 2025, 6:42 PM
Unknown Object (File)
Feb 9 2025, 6:42 PM
Unknown Object (File)
Feb 9 2025, 6:41 PM
Unknown Object (File)
Feb 6 2025, 7:05 PM
Unknown Object (File)
Jan 13 2025, 3:18 PM

Details

Summary

pf_setup_pdesc() panics if address family is neither AF_INET nor
AF_INET6. So remove useless af switch defaults here and there.
Always use "switch(af)" instead of "if (af) else" for af dependent
code. Always use AF_ defines instead of PF_ when checking af values.
ok claudio mpf henning

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable