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)
Thu, Dec 11, 4:23 AM
Unknown Object (File)
Thu, Nov 27, 1:31 AM
Unknown Object (File)
Wed, Nov 26, 10:28 AM
Unknown Object (File)
Sun, Nov 23, 4:38 AM
Unknown Object (File)
Fri, Nov 21, 6:28 PM
Unknown Object (File)
Thu, Nov 13, 4:27 AM
Unknown Object (File)
Nov 11 2025, 1:55 AM
Unknown Object (File)
Nov 5 2025, 6:25 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 Not Applicable
Unit
Tests Not Applicable