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
F169806187: D50446.id155801.diff
Wed, Sep 2, 3:12 PM
Unknown Object (File)
Tue, Sep 1, 9:30 AM
Unknown Object (File)
Tue, Sep 1, 1:31 AM
Unknown Object (File)
Mon, Aug 31, 12:11 PM
Unknown Object (File)
Sun, Aug 30, 9:46 AM
Unknown Object (File)
Sun, Aug 30, 1:55 AM
Unknown Object (File)
Sat, Aug 29, 9:21 PM
Unknown Object (File)
Wed, Aug 26, 10:16 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