Page MenuHomeFreeBSD

kern: wg: refactor out some repetitive bits in allowed-ip config
ClosedPublic

Authored by kevans on May 21 2025, 4:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 8, 9:12 PM
Unknown Object (File)
Thu, Oct 2, 10:06 PM
Unknown Object (File)
Thu, Sep 25, 10:28 PM
Unknown Object (File)
Mon, Sep 22, 12:47 AM
Unknown Object (File)
Sun, Sep 21, 3:13 PM
Unknown Object (File)
Sep 13 2025, 6:39 AM
Unknown Object (File)
Sep 10 2025, 5:13 PM
Unknown Object (File)
Sep 9 2025, 3:08 PM
Subscribers

Details

Summary

The only difference in the wg_aip_add() call after IP validation is the
address family. Just pull that out into a variable and avoid the two
different callsites for wg_aip_add(). A future change will add a new
call for each case to remove an address from the peer, so it's nice to
avoid needing to repeat the logic for two different branches.

Diff Detail

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