[openwrt/openwrt] 6in4: allow specifying tunnel device name
LEDE Commits
lede-commits at lists.infradead.org
Sun Sep 22 07:30:01 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cdb535ac3231cdcbb15f8682e0f165424e282003
commit cdb535ac3231cdcbb15f8682e0f165424e282003
Author: Aleksandr V. Piskunov <aleksandr.v.piskunov at gmail.com>
AuthorDate: Tue Jul 16 16:39:17 2024 +0300
6in4: allow specifying tunnel device name
Accept 'device' option, allowing to specify custom l3 device name,
instead of default autogenerated one (prefix "6in4-" + interface name)
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/files/6in4.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/package/network/ipv6/6in4/files/6in4.sh b/package/network/ipv6/6in4/files/6in4.sh
index 5b5c7b36af..99b2b76312 100755
--- a/package/network/ipv6/6in4/files/6in4.sh
+++ b/package/network/ipv6/6in4/files/6in4.sh
@@ -45,10 +45,12 @@ proto_6in4_setup() {
local iface="$2"
local link="6in4-$cfg"
- local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey
- json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey
+ 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
json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes
+ [ -n "$device" ] && link="$device"
+
[ -z "$peeraddr" ] && {
proto_notify_error "$cfg" "MISSING_ADDRESS"
proto_block_restart "$cfg"
@@ -156,6 +158,7 @@ proto_6in4_init_config() {
proto_config_add_int "mtu"
proto_config_add_int "ttl"
proto_config_add_string "tos"
+ proto_config_add_string "device"
}
[ -n "$INCLUDE_ONLY" ] || {
More information about the lede-commits
mailing list