git: wg: Improve noise_begin_session()

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


commit f0424a0dd15923767442beb8f47eb358d21cc9f8
Author: Aaron LI <aly at aaronly.me>
Date:   Sat Jan 6 23:29:06 2024 +0800

    wg: Improve noise_begin_session()
    
    - Merge noise_add_new_keypair() into noise_begin_session(), as it's only
      used there.
    - Add extra comments to explain the operations to the keypairs,
      especially the index replacement in the hashtable.  This helps a lot
      in understanding the code.
    - Change the function to return a boolean, making the callers easier to
      use it.

Summary of changes:
 sys/net/wg/wg_noise.c | 178 ++++++++++++++++++++++++++------------------------
 1 file changed, 93 insertions(+), 85 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list