]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
if_bridge: clean up INET/INET6 handling
authorLexi Winter <lexi@le-Fay.ORG>
Sun, 21 Apr 2024 18:56:23 +0000 (19:56 +0100)
committerMark Johnston <markj@FreeBSD.org>
Mon, 22 Apr 2024 16:01:27 +0000 (12:01 -0400)
commitef84dd8f4926304306d5989ca9afdbf760c6d813
tree89f9c9ec15a30f03b6c0e5b1c4b948173d5fbfda
parent7f7b4926a779845116913c85ecbb10527daeab02
if_bridge: clean up INET/INET6 handling

The if_bridge contains several instances of:

if (AF_INET code ...
#ifdef INET6
    AF_INET6 code ...
#endif
) {
...

Clean this up by adding a couple of macros at the top of the file that
are conditionally defined based on whether INET and/or INET6 are enabled,
which makes the code more readable and easier to maintain.

No functional change intended.

Reviewed by: zlei, markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1191
sys/net/if_bridge.c