git: wg: Improve the return types of noise handshake functions

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


commit e44138a780183f2ea032b3371adb0b33a3b91e2a
Author: Aaron LI <aly at aaronly.me>
Date:   Sat Jan 6 23:41:56 2024 +0800

    wg: Improve the return types of noise handshake functions
    
    - Change noise_create_initiation() and noise_create_response() to return
      a boolean.
    - Change noise_consume_initiation() and noise_consume_response() to
      return the corresponding remote, with another reference acquired.
      As a result, the 'struct noise_remote **' parameter is obsolete and
      removed.
    - Update the callers in if_wg.c accordingly.
    
    Referred to Linux's version.

Summary of changes:
 sys/net/wg/if_wg.c    | 22 ++++++++++++----------
 sys/net/wg/wg_noise.c | 45 +++++++++++++++++++++------------------------
 sys/net/wg/wg_noise.h | 12 ++++++------
 3 files changed, 39 insertions(+), 40 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e44138a780183f2ea032b3371adb0b33a3b91e2a


-- 
DragonFly BSD source repository


More information about the Commits mailing list