diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2022-10-28 20:36:12 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2022-10-28 20:36:12 +0000 |
| commit | 744bfb213144c63cbaf38d91a1c4f7aebb9b9fbc (patch) | |
| tree | 668f485d546b43d129c21513afccdfc2cc30fd3c /sys/modules | |
| parent | 9e0aaedd704ee8a040ecb1d1aadf0bd75ed4dc09 (diff) | |
Import the WireGuard driver from zx2c4.com.
This commit brings back the driver from FreeBSD commit
f187d6dfbf633665ba6740fe22742aec60ce02a2 plus subsequent fixes from
upstream.
Relative to upstream this commit includes a few other small fixes such
as additional INET and INET6 #ifdef's, #include cleanups, and updates
for recent API changes in main.
Reviewed by: pauamma, gbe, kevans, emaste
Obtained from: git@git.zx2c4.com:wireguard-freebsd @ 3cc22b2
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36909
Diffstat (limited to 'sys/modules')
| -rw-r--r-- | sys/modules/Makefile | 4 | ||||
| -rw-r--r-- | sys/modules/if_wg/Makefile | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 6f718acab38b..00afbffb1baf 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -164,6 +164,7 @@ SUBDIR= \ if_tuntap \ if_vlan \ if_vxlan \ + ${_if_wg} \ iflib \ ${_igc} \ imgact_binmisc \ @@ -449,6 +450,9 @@ _toecore= toecore _if_enc= if_enc _if_gif= if_gif _if_gre= if_gre +.if ${MK_CRYPT} != "no" || defined(ALL_MODULES) +_if_wg= if_wg +.endif _ipfw_pmod= ipfw_pmod .if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MIPSEC} _ipsec= ipsec diff --git a/sys/modules/if_wg/Makefile b/sys/modules/if_wg/Makefile new file mode 100644 index 000000000000..b47a87472116 --- /dev/null +++ b/sys/modules/if_wg/Makefile @@ -0,0 +1,10 @@ +.PATH: ${SRCTOP}/sys/dev/wg + +KMOD= if_wg + +SRCS= if_wg.c wg_cookie.c wg_crypto.c wg_noise.c +SRCS+= opt_inet.h opt_inet6.h device_if.h bus_if.h + +.include <bsd.kmod.mk> + +CFLAGS+= -include ${SRCTOP}/sys/dev/wg/compat.h |
