Skip to content

Commit

Permalink
6in4: add 'nohostroute' option
Browse files Browse the repository at this point in the history
Same as 'nohostroute' option for GRE tunnels (commit 0f8b9ad)
and IPIP tunnels (commit 46ce629)

Signed-off-by: Aleksandr V. Piskunov <[email protected]>
Link: openwrt/openwrt#15961
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
notgood authored and hauke committed Sep 22, 2024
1 parent 6b5aea7 commit a47bf90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package/network/ipv6/6in4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions package/network/ipv6/6in4/files/6in4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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" ] || {
Expand Down

0 comments on commit a47bf90

Please sign in to comment.