icwmp: Added dslforum.org in dhcp option 60

This commit is contained in:
suvendhu 2023-01-13 13:04:38 +05:30 committed by vdutta
parent c3f5c269aa
commit 087e0e3750
2 changed files with 22 additions and 4 deletions

View file

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.1.5
PKG_VERSION:=9.1.6
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git

View file

@ -205,6 +205,16 @@ enable_dnsmasq_option125() {
fi
}
set_vendor_id() {
local wan="${1}"
local proto="$(uci -q get network.$wan.proto)"
if [ "${proto}" == "dhcp" ]; then
uci -q set network.$wan.vendorid="dslforum.org"
ubus call uci commit '{"config":"network"}'
fi
}
enable_disable_dhcp_option125() {
local wan="${1}"
local action="${2}"
@ -240,7 +250,7 @@ enable_disable_dhcp_option125() {
uci -q set network.$wan.reqopts="$newreqopts"
network_uci_update=1
fi
.
if [ ${send125_present} -eq 0 ]; then
configure_send_op125 "${sendopts}" "${wan}" "network"
network_uci_update=1
@ -395,15 +405,23 @@ validate_defaults() {
}
boot() {
local enable_cwmp="0"
local dhcp_discovery="0"
config_load cwmp
config_get dhcp_discovery acs dhcp_discovery "0"
config_get_bool enable_cwmp cpe enable 1
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
config_get dhcp_discovery acs dhcp_discovery "0"
config_get wan_interface cpe default_wan_interface "wan"
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
# Set dhcp option 60
set_vendor_id "${wan_interface}"
fi
config_get lan_interface cpe default_lan_interface ""
@ -422,7 +440,7 @@ boot() {
regenerate_ssl_link "${ssl_capath}"
fi
# Copy backup data so that if it restart latter on it gets the info
# Copy backup data so that if it restart latter on, it gets the info
copy_cwmp_etc_files_to_varstate
start