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)
Sat, Sep 5, 11:52 AM
Unknown Object (File)
Fri, Sep 4, 11:58 PM
Unknown Object (File)
Fri, Sep 4, 8:43 PM
Unknown Object (File)
Thu, Sep 3, 9:31 PM
Unknown Object (File)
Thu, Sep 3, 8:14 PM
Unknown Object (File)
Thu, Sep 3, 11:48 AM
Unknown Object (File)
Thu, Sep 3, 9:29 AM
Unknown Object (File)
Thu, Sep 3, 4:54 AM

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