git: wg: Port #26: adapt the radix code for peer allowed IPs

Aaron LI aly at crater.dragonflybsd.org
Thu Feb 8 00:32:28 PST 2024


commit 865b96cf364b485f84d67422e2d80ed40d0f3297
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Nov 15 09:51:44 2023 +0800

    wg: Port #26: adapt the radix code for peer allowed IPs
    
    - Create a global mask tree and share it with all peers' AIP trees.
    - Add the 'sc_aip_lock' lock to protect both the IPv4 and IPv6 trees.
    - Refactor the handling of various cases in wg_aip_add() to make the
      logic more clear.
    - Refactor wg_aip_remove_all() to simplify the code.

Summary of changes:
 sys/net/wg/if_wg.c | 164 ++++++++++++++++++++++++++++++-----------------------
 1 file changed, 93 insertions(+), 71 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/865b96cf364b485f84d67422e2d80ed40d0f3297


-- 
DragonFly BSD source repository


More information about the Commits mailing list