Compare commits

...

4 Commits

Author SHA1 Message Date
Adrien Gallouët
f65ecac5fe Skip ip rule errors for now
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
2017-11-30 16:31:57 +00:00
Adrien Gallouët
086fa412ed Add CAP_NET_RAW by default (needed by mtu-auto)
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
2017-11-30 16:31:26 +00:00
Adrien Gallouët
8476332224 Set mtu-auto by default in glorytun-setup
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
2017-11-30 16:22:11 +00:00
Adrien Gallouët
9dacd85713 Add missing include
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
2017-11-30 16:17:47 +00:00
4 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
#include "common.h"
#include "str.h"
#include "iface.h"
#include <sys/ioctl.h>
#include <net/if.h>

View File

@@ -20,9 +20,9 @@ if [ -n "$HOST" ]; then
fi
if [ -z "$BIND" ]; then
BIND=$(ip route get "$HOST" | awk '/src/{getline;print $0}' RS=' ')
ip rule add from "$BIND" table main pref "$((PREF-1))"
ip rule add from "$BIND" table main pref "$((PREF-1))" || true
fi
ip rule add from all table 200 pref "$PREF"
ip rule add from all table 200 pref "$PREF" || true
fi
exec glorytun \

View File

@@ -28,6 +28,7 @@ mkdir -p /etc/glorytun
cat > /etc/glorytun/"$NAME" <<EOF
${HOST:+HOST="$HOST"}
MTU_AUTO=yes
EOF
( umask 077; echo "$KEY" > /etc/glorytun/"$NAME".key )

View File

@@ -6,7 +6,7 @@ After=network.target
Type=simple
Restart=always
ExecStart=@bindir@/glorytun-run /etc/glorytun/%i
CapabilityBoundingSet=CAP_NET_ADMIN
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
[Install]
WantedBy=multi-user.target