aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/ipip
diff options
context:
space:
mode:
authorMatthew Hagan <mnhagan88@gmail.com>2022-01-18 12:24:54 +0000
committerHans Dedecker <dedeckeh@gmail.com>2022-01-19 20:57:59 +0100
commit46ce629fe0e48236ef926debee5f188f5f99c3f0 (patch)
treeb86a6e84f6d20e22fb1de8f99cf49907d38dccd2 /package/network/config/ipip
parentec85e48a113514502563a06c5d0278a57a8b6b86 (diff)
downloadupstream-46ce629fe0e48236ef926debee5f188f5f99c3f0.tar.gz
upstream-46ce629fe0e48236ef926debee5f188f5f99c3f0.tar.bz2
upstream-46ce629fe0e48236ef926debee5f188f5f99c3f0.zip
ipip: add 'nohostroute' option
Add the nohostroute option as available for gre and wg tunnels to allow the user to prevent explicit creation of a route to the peer address. Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Diffstat (limited to 'package/network/config/ipip')
-rw-r--r--package/network/config/ipip/Makefile2
-rwxr-xr-xpackage/network/config/ipip/files/ipip.sh7
2 files changed, 6 insertions, 3 deletions
diff --git a/package/network/config/ipip/Makefile b/package/network/config/ipip/Makefile
index c262182558..4494e1b81f 100644
--- a/package/network/config/ipip/Makefile
+++ b/package/network/config/ipip/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ipip
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/config/ipip/files/ipip.sh b/package/network/config/ipip/files/ipip.sh
index 15b1c978e3..c433ee0de4 100755
--- a/package/network/config/ipip/files/ipip.sh
+++ b/package/network/config/ipip/files/ipip.sh
@@ -12,7 +12,7 @@ proto_ipip_setup() {
local remoteip
local df ipaddr peeraddr tunlink ttl tos zone mtu
- json_get_vars df ipaddr peeraddr tunlink ttl tos zone mtu
+ json_get_vars df ipaddr peeraddr tunlink ttl tos zone mtu nohostroute
[ -z "$peeraddr" ] && {
proto_notify_error "$cfg" "MISSING_PEER_ADDRESS"
@@ -32,7 +32,9 @@ proto_ipip_setup() {
break
done
- ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" )
+ if [ "${nohostroute}" != "1" ]; then
+ ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" )
+ fi
[ -z "$ipaddr" ] && {
local wanif="$tunlink"
@@ -84,6 +86,7 @@ proto_ipip_init_config() {
proto_config_add_string "ipaddr"
proto_config_add_string "peeraddr"
proto_config_add_boolean "df"
+ proto_config_add_boolean "nohostroute"
}
[ -n "$INCLUDE_ONLY" ] || {