Skip to content

Commit 3e9f831

Browse files
committed
net: wireguard: Add support for wireguard in-tree
1 parent 2d0059f commit 3e9f831

101 files changed

Lines changed: 50869 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

net/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ config INET
8383
Short answer: say Y.
8484

8585
if INET
86+
source "net/wireguard/Kconfig"
8687
source "net/ipv4/Kconfig"
8788
source "net/ipv6/Kconfig"
8889
source "net/netlabel/Kconfig"

net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ obj-$(CONFIG_NET) += $(tmp-y)
1414
obj-$(CONFIG_LLC) += llc/
1515
obj-$(CONFIG_NET) += ethernet/ 802/ sched/ netlink/
1616
obj-$(CONFIG_NETFILTER) += netfilter/
17+
obj-$(CONFIG_WIREGUARD) += wireguard/
1718
obj-$(CONFIG_INET) += ipv4/
1819
obj-$(CONFIG_XFRM) += xfrm/
1920
obj-$(CONFIG_UNIX) += unix/

net/wireguard/Kconfig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
config WIREGUARD
2+
tristate "IP: WireGuard secure network tunnel"
3+
depends on NET && INET
4+
depends on IPV6 || !IPV6
5+
select NET_UDP_TUNNEL
6+
select DST_CACHE
7+
select CRYPTO
8+
select CRYPTO_ALGAPI
9+
select VFP
10+
select VFPv3 if CPU_V7
11+
select NEON if CPU_V7
12+
select KERNEL_MODE_NEON if CPU_V7
13+
default m
14+
help
15+
WireGuard is a secure, fast, and easy to use replacement for IPsec
16+
that uses modern cryptography and clever networking tricks. It's
17+
designed to be fairly general purpose and abstract enough to fit most
18+
use cases, while at the same time remaining extremely simple to
19+
configure. See www.wireguard.com for more info.
20+
21+
It's safe to say Y or M here, as the driver is very lightweight and
22+
is only in use when an administrator chooses to add an interface.
23+
24+
config WIREGUARD_DEBUG
25+
bool "Debugging checks and verbose messages"
26+
depends on WIREGUARD
27+
help
28+
This will write log messages for handshake and other events
29+
that occur for a WireGuard interface. It will also perform some
30+
extra validation checks and unit tests at various points. This is
31+
only useful for debugging.
32+
33+
Say N here unless you know what you're doing.

net/wireguard/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
#
3+
# Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
4+
5+
ccflags-y := -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt'
6+
ccflags-y += -Wframe-larger-than=2048
7+
ccflags-$(CONFIG_WIREGUARD_DEBUG) += -DDEBUG -g
8+
ccflags-$(if $(WIREGUARD_VERSION),y,) += -D'WIREGUARD_VERSION="$(WIREGUARD_VERSION)"'
9+
10+
wireguard-y := main.o noise.o device.o peer.o timers.o queueing.o send.o receive.o socket.o peerlookup.o allowedips.o ratelimiter.o cookie.o netlink.o
11+
12+
include $(src)/crypto/Makefile.include
13+
include $(src)/compat/Makefile.include
14+
15+
obj-$(if $(KBUILD_EXTMOD),m,$(CONFIG_WIREGUARD)) := wireguard.o

0 commit comments

Comments
 (0)