extract-{handshakes,keys}: rework for upstream kernel

Now that WireGuard has been upstreamed and the repos split, we have to
look elsewhere for these headers.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-02-01 00:48:25 +01:00
parent 27c885ff08
commit 1ad6b17c35
4 changed files with 6 additions and 16 deletions

View file

@ -20,10 +20,5 @@ clean:
.PHONY: clean
else
offset-finder-m := offset-finder.o
oldsrc := $(src)
src := $(src)/../../../src
include $(src)/compat/Kbuild.include
include $(src)/crypto/Kbuild.include
src := $(oldsrc)
obj-m := offset-finder.o
endif

View file

@ -11,7 +11,7 @@ struct def {
extern const struct def defs[];
#ifdef __KERNEL__
#include "../../../src/noise.h"
#include "../drivers/net/wireguard/noise.h"
const struct def defs[] = {
{ "LOCAL_STATIC_PRIVATE_KEY", offsetof(struct noise_static_identity, static_private), offsetof(struct noise_handshake, static_identity) },

View file

@ -23,10 +23,5 @@ clean:
.PHONY: clean
else
config-m := config.o
oldsrc := $(src)
src := $(src)/../../../src
include $(src)/compat/Kbuild.include
include $(src)/crypto/Kbuild.include
src := $(oldsrc)
obj-m := config.o
endif

View file

@ -10,9 +10,9 @@ struct def {
extern const struct def defs[];
#ifdef __KERNEL__
#include "../../../src/device.h"
#include "../../../src/peer.h"
#include "../../../src/noise.h"
#include "../drivers/net/wireguard/device.h"
#include "../drivers/net/wireguard/peer.h"
#include "../drivers/net/wireguard/noise.h"
const struct def defs[] = {
{ "SOCK_DEVICE_OFFSET", offsetof(struct sock, sk_user_data) },
{ "DEVICE_NAME_OFFSET", -ALIGN(sizeof(struct net_device), NETDEV_ALIGN) + offsetof(struct net_device, name) },