[openwrt/openwrt] comgt: directip: add delegate option support

LEDE Commits lede-commits at lists.infradead.org
Sun Sep 22 14:45:58 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/105a5790b7131015c083cc3f08c81c3aca2b228a

commit 105a5790b7131015c083cc3f08c81c3aca2b228a
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Wed May 15 22:57:06 2024 +0800

    comgt: directip: add delegate option support
    
    Ipv6 delegate option is not respected by proto directip
    this add support for it.
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15508
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/utils/comgt/Makefile          | 2 +-
 package/network/utils/comgt/files/directip.sh | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile
index 429c938602..0e826e12cd 100644
--- a/package/network/utils/comgt/Makefile
+++ b/package/network/utils/comgt/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=comgt
 PKG_VERSION:=0.32
-PKG_RELEASE:=35
+PKG_RELEASE:=36
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/comgt
diff --git a/package/network/utils/comgt/files/directip.sh b/package/network/utils/comgt/files/directip.sh
index c3b9abcad6..6535de936f 100644
--- a/package/network/utils/comgt/files/directip.sh
+++ b/package/network/utils/comgt/files/directip.sh
@@ -16,6 +16,7 @@ proto_directip_init_config() {
 	proto_config_add_string "username"
 	proto_config_add_string "password"
 	proto_config_add_boolean sourcefilter
+	proto_config_add_boolean delegate
 	proto_config_add_defaults
 }
 
@@ -23,8 +24,8 @@ proto_directip_setup() {
 	local interface="$1"
 	local chat devpath devname
 
-	local device apn pincode ifname auth username password sourcefilter $PROTO_DEFAULT_OPTIONS
-	json_get_vars device apn pincode auth username password sourcefilter $PROTO_DEFAULT_OPTIONS
+	local device apn pincode ifname auth username password sourcefilter delegate $PROTO_DEFAULT_OPTIONS
+	json_get_vars device apn pincode auth username password sourcefilter delegate $PROTO_DEFAULT_OPTIONS
 
 	[ -n "$ctl_device" ] && device=$ctl_device
 
@@ -90,6 +91,7 @@ proto_directip_setup() {
 	json_add_string ifname "@$interface"
 	json_add_string proto "dhcpv6"
 	json_add_string extendprefix 1
+	[ "$delegate" = "0" ] && json_add_boolean delegate "0"
 	[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 	proto_add_dynamic_defaults
 	ubus call network add_dynamic "$(json_dump)"




More information about the lede-commits mailing list