forked from runfalk/synology-wireguard
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request runfalk#71 from Matige/DSM7.0
Add support for DSM 7.0
- Loading branch information
Showing
20 changed files
with
337 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"usr-local-linker": { | ||
"bin": ["wireguard/wg", "wireguard/wg-quick", "wireguard/wg-autostart"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[Unit] | ||
Description=WireGuard via wg-quick(8) for %I | ||
After=pkgctl-WireGuard.service | ||
Wants=pkgctl-WireGuard.service | ||
Documentation=https://github.com/runfalk/synology-wireguard | ||
Documentation=https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8 | ||
Documentation=https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8 | ||
Documentation=https://www.wireguard.com/ | ||
Documentation=https://www.wireguard.com/quickstart/ | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/local/bin/wg-quick up %i | ||
ExecStop=/usr/local/bin/wg-quick down %i | ||
ExecReload=/bin/bash -c 'exec /usr/local/bin/wg syncconf %i <(exec /usr/local/bin/wg-quick strip %i)' | ||
Environment=WG_ENDPOINT_RESOLUTION_RETRIES=infinity | ||
|
||
[Install] | ||
WantedBy=syno-low-priority-packages.target |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- netlink.c 2021-01-09 19:18:42.109012366 +0100 | ||
+++ netlink.c 2021-01-09 16:08:05.098280000 +0100 | ||
@@ -62,8 +62,8 @@ | ||
nla_data(attrs[WGDEVICE_A_IFNAME])); | ||
if (!dev) | ||
return ERR_PTR(-ENODEV); | ||
- if (!dev->rtnl_link_ops || !dev->rtnl_link_ops->kind || | ||
- strcmp(dev->rtnl_link_ops->kind, KBUILD_MODNAME)) { | ||
+ if (!dev->dev.type || !dev->dev.type->name || | ||
+ strcmp(dev->dev.type->name, KBUILD_MODNAME)) { | ||
dev_put(dev); | ||
return ERR_PTR(-EOPNOTSUPP); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- peerlookup.c 2021-01-19 01:34:52.624027083 +0100 | ||
+++ peerlookup.c 2021-01-19 01:40:12.063429383 +0100 | ||
@@ -7,6 +7,9 @@ | ||
#include "peer.h" | ||
#include "noise.h" | ||
|
||
+#define spin_lock_bh(lock) __raw_spin_lock_bh(&(lock)->rlock) | ||
+#define spin_unlock_bh(lock) __raw_spin_unlock_bh(&(lock)->rlock) | ||
+ | ||
static struct hlist_head *pubkey_bucket(struct pubkey_hashtable *table, | ||
const u8 pubkey[NOISE_PUBLIC_KEY_LEN]) | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- ratelimiter.c 2021-01-19 01:34:52.624027083 +0100 | ||
+++ ratelimiter.c 2021-01-19 01:38:32.474371582 +0100 | ||
@@ -21,6 +21,9 @@ | ||
#include <linux/slab.h> | ||
#include <net/ip.h> | ||
|
||
+#define spin_lock(lock) __raw_spin_lock(&(lock)->rlock) | ||
+#define spin_unlock(lock) __raw_spin_unlock(&(lock)->rlock) | ||
+ | ||
static struct kmem_cache *entry_cache; | ||
static hsiphash_key_t key; | ||
static spinlock_t table_lock = __SPIN_LOCK_UNLOCKED("ratelimiter_table_lock"); |
Oops, something went wrong.