git: wg: Improve wg_clone_destroy() and wg_down()
Aaron LI
aly at crater.dragonflybsd.org
Thu Feb 15 00:28:04 PST 2024
commit 7a908fa378491b120fefcc3e59a31a97994a2b88
Author: Aaron LI <aly at aaronly.me>
Date: Sat Feb 3 14:49:35 2024 +0800
wg: Improve wg_clone_destroy() and wg_down()
- Move the cancellation of tasks from wg_clone_destroy() to wg_down(),
which is actually more appropriate.
- Just call wg_down() in wg_clone_destroy() to reduce duplicate code.
- No need to call if_purgeaddrs_nolink(), as it will be called by
if_detach().
- Detach and free the interface before destroying the aip radix trees,
in order to avoid possible panics.
Summary of changes:
sys/net/wg/if_wg.c | 70 +++++++++++++++++++++++++++++-------------------------
1 file changed, 38 insertions(+), 32 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7a908fa378491b120fefcc3e59a31a97994a2b88
--
DragonFly BSD source repository
More information about the Commits
mailing list