[openwrt/openwrt] 6in4: add 'nohostroute' option
LEDE Commits
lede-commits at lists.infradead.org
Sun Sep 22 07:30:03 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a47bf906cd39aaae1a845fe4f69fa0e7557ca4d2
commit a47bf906cd39aaae1a845fe4f69fa0e7557ca4d2
Author: Aleksandr V. Piskunov <aleksandr.v.piskunov at gmail.com>
AuthorDate: Tue Jul 16 16:58:11 2024 +0300
6in4: add 'nohostroute' option
Same as 'nohostroute' option for GRE tunnels (commit 0f8b9addfc)
and IPIP tunnels (commit 46ce629fe0)
Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15961
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
package/network/ipv6/6in4/Makefile | 2 +-
package/network/ipv6/6in4/files/6in4.sh | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/package/network/ipv6/6in4/Makefile b/package/network/ipv6/6in4/Makefile
index 3c7dd4609b..b70da23e82 100644
--- a/package/network/ipv6/6in4/Makefile
+++ b/package/network/ipv6/6in4/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6in4
-PKG_RELEASE:=28
+PKG_RELEASE:=29
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/ipv6/6in4/files/6in4.sh b/package/network/ipv6/6in4/files/6in4.sh
index e500c6dec8..dd055ecb63 100755
--- a/package/network/ipv6/6in4/files/6in4.sh
+++ b/package/network/ipv6/6in4/files/6in4.sh
@@ -46,8 +46,8 @@ proto_6in4_setup() {
local link="6in4-$cfg"
local remoteip
- local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey device
- json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey device
+ local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey device nohostroute
+ json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey device nohostroute
json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes
[ -n "$device" ] && link="$device"
@@ -70,7 +70,9 @@ proto_6in4_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"
@@ -172,6 +174,7 @@ proto_6in4_init_config() {
proto_config_add_int "ttl"
proto_config_add_string "tos"
proto_config_add_string "device"
+ proto_config_add_boolean "nohostroute"
}
[ -n "$INCLUDE_ONLY" ] || {
More information about the lede-commits
mailing list