Fixed duplicate default route drop causing problems (#1723)

This commit is contained in:
Patrick Kishino 2021-02-17 20:44:36 +09:00 committed by GitHub
parent 6ce64c4f36
commit b68db41955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -37,8 +37,6 @@ if [ -n "${NS}" ] ; then
chmod 644 /etc/resolv.conf chmod 644 /etc/resolv.conf
fi fi
fi fi
# Remove the original default route to avoid leaks.
route del default gw "${route_net_gateway}"
fi fi
/etc/transmission/start.sh "$@" /etc/transmission/start.sh "$@"

View File

@ -64,7 +64,8 @@ fi
if [[ "true" = "$DROP_DEFAULT_ROUTE" ]]; then if [[ "true" = "$DROP_DEFAULT_ROUTE" ]]; then
echo "DROPPING DEFAULT ROUTE" echo "DROPPING DEFAULT ROUTE"
ip r del default || exit 1 # Remove the original default route to avoid leaks.
route del default gw "${route_net_gateway}" || exit 1
fi fi
if [[ "true" = "$LOG_TO_STDOUT" ]]; then if [[ "true" = "$LOG_TO_STDOUT" ]]; then