icwmp: update dhcp on-boading

- disable dhcp_discovery once on-boarded
- Only allow `https` url through dhcp option 43
This commit is contained in:
Suvendhu Hansa 2025-09-22 12:56:25 +05:30 committed by IOPSYS Dev
parent 8b106e6b58
commit e6054d9f8f
No known key found for this signature in database
2 changed files with 14 additions and 2 deletions

View file

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.10.3
PKG_VERSION:=9.10.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=31bed647eae9d3389085769118f1055d1620e1a2
PKG_SOURCE_VERSION:=505d3d63e06d84b144ce2eb63ea89af723abf0ed
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View file

@ -77,6 +77,7 @@ get_opt43() {
config_load cwmp
config_get wan_intf cpe default_wan_interface "wan"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get_bool insecure_enable acs insecure_enable "0"
config_get dhcp_url acs dhcp_url ""
config_get min_wait_intvl acs dhcp_retry_min_wait_interval "0"
config_get intvl_multi acs dhcp_retry_interval_multiplier "0"
@ -102,6 +103,17 @@ if [ "${wan_intf}" = "${INTERFACE}" ]; then
return 0
fi
if [ "${insecure_enable}" -eq "0" ]; then
case $DHCP_ACS_URL in
https://*)
log "ACS url $DHCP_ACS_URL has https"
;;
*)
return 0
;;
esac
fi
sec=$(uci -q get cwmp.acs)
if [ -z "${sec}" ]; then