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)
Tue, Aug 4, 6:00 AM
Unknown Object (File)
Mon, Jul 27, 5:28 PM
Unknown Object (File)
Tue, Jul 21, 10:46 AM
Unknown Object (File)
Mon, Jul 13, 12:33 PM
Unknown Object (File)
Sun, Jul 12, 12:39 AM
Unknown Object (File)
Jul 6 2026, 3:32 AM
Unknown Object (File)
Jun 30 2026, 10:44 PM
Unknown Object (File)
Jun 24 2026, 1:03 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 64332
Build 61216: arc lint + arc unit