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)
Fri, Jan 9, 1:23 PM
Unknown Object (File)
Mon, Jan 5, 5:47 PM
Unknown Object (File)
Sat, Jan 3, 6:28 PM
Unknown Object (File)
Dec 15 2025, 2:24 AM
Unknown Object (File)
Dec 11 2025, 4:23 AM
Unknown Object (File)
Nov 27 2025, 1:31 AM
Unknown Object (File)
Nov 26 2025, 10:28 AM
Unknown Object (File)
Nov 23 2025, 4:38 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