git: wg: Port #32: refactor interface code and avoid deferred free

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


commit 29a085f5ade96721e4f2bc6c62e60ab86be19d88
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Dec 29 14:27:59 2023 +0800

    wg: Port #32: refactor interface code and avoid deferred free
    
    - Refactor wg_clone_destroy() to not use async/deferred free, and thus
      avoid the async call of wg_clone_deferred_free() via noise_local_free().
      As a consequence, remove the 'l_arg' and 'l_cleanup' members from
      'noise_local' struct; also remove the noise_local_arg() API.
    
    - Fix wg_clone_destroy() to not clear 'if_softc' at the beginning of the
      destruction, which fixes a panic of NULL dereference in wg_output()
      via the if_purgeaddrs_nolink() call.
    
    - Remove the 'WGF_DYING' flag and the associated obsolete code.
    
    - Remove the 'clone_count' global as it's no longer required.

Summary of changes:
 sys/net/wg/if_wg.c    | 74 +++++++++++++++++----------------------------------
 sys/net/wg/wg_noise.c | 17 ++----------
 sys/net/wg/wg_noise.h |  5 ++--
 3 files changed, 28 insertions(+), 68 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/29a085f5ade96721e4f2bc6c62e60ab86be19d88


-- 
DragonFly BSD source repository


More information about the Commits mailing list