From 0d2c373514de8afd5174b32215513c631d10c357 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 16 Oct 2019 11:19:14 +0200 Subject: Ignore routes not for the wg interface Adding 127.0.0.0/8 (lo) for example is not what we want. Didn't happen in tests/netsh.sh because the use of network namespaces. --- lease.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lease.h') diff --git a/lease.h b/lease.h index 40c461f..9cbe547 100644 --- a/lease.h +++ b/lease.h @@ -28,7 +28,7 @@ struct wg_dynamic_lease { * Initializes internal state, retrieves routes from nlsock and reads leases * from fname. */ -void leases_init(char *fname, struct mnl_socket *nlsock); +void leases_init(char *fname, struct mnl_socket *nlsock, uint32_t ifindex); /* * Frees everything, closes file. @@ -60,6 +60,6 @@ int leases_refresh(const char *devname); /* * Updates all pools with information from the mnl socket nlsock. */ -void leases_update_pools(struct mnl_socket *nlsock); +void leases_update_pools(struct mnl_socket *nlsock, uint32_t ifindex); #endif -- cgit v1.2.3-59-g8ed1b