wg: Port #36: reimplement loop detection feature
authorAaron LI <aly@aaronly.me>
Sat, 13 Jan 2024 13:27:37 +0000 (21:27 +0800)
committerAaron LI <aly@aaronly.me>
Thu, 8 Feb 2024 06:44:47 +0000 (14:44 +0800)
commitc7dc8227899e19aa0b7b04be079602abadf4f4eb
treebfeaf0fdae28dfcec051f1f08c76dd106c1ede6a
parent4b2460af64ed04cd59f990f645628adeeb6f443a
wg: Port #36: reimplement loop detection feature

The mbuf m_pkthdr has been extended to provide the 'loop_cnt' member to
help detect loops.  Adapt the code to make use of it.

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