wg: Port #37: reimplement wg_mbuf_reset()
commitc515cffa1704236746b4195f550d69bd90d5aa77
authorAaron LI <aly@aaronly.me>
Tue, 9 Jan 2024 01:57:23 +0000 (9 09:57 +0800)
committerAaron LI <aly@aaronly.me>
Thu, 8 Feb 2024 06:44:47 +0000 (8 14:44 +0800)
treeac5c72a9e8dbbe86c2e5ff21360e72cec27c9809
parentc7dc8227899e19aa0b7b04be079602abadf4f4eb
wg: Port #37: reimplement wg_mbuf_reset()

We define the 'MBUF_CLEARFLAGS' based on 'M_COPYFLAGS' for the mbuf
flags to be cleared.  Since we don't make use of mbuf tag for loop
detection, the wg_mbuf_reset() function becomes really simple, so I just
do mbuf resetting in wg_encrypt()/wg_decrypt() and remove this function.

Referred-to: OpenBSD
sys/net/wg/if_wg.c