diff --git a/docs/api/uci/cwmp.md b/docs/api/uci/cwmp.md index 3e24d77..5156fdc 100644 --- a/docs/api/uci/cwmp.md +++ b/docs/api/uci/cwmp.md @@ -1 +1,1045 @@ -
cwmp
section
description
multi
options
acs
Configure the ACS parameters, used by icwmp
false
name
type
required
default
description
url
string
yes
URL of ACS server
userid
string
no
Username for ACS server connection
passwd
string
no
Password for ACS server connection
periodic_inform_enable
boolean
no
1
If set to **1**, the CPE must periodically open session with ACS by sending Inform message to the ACS.
periodic_inform_interval
uinteger
no
86400
The duration in seconds of the interval for which the CPE must attempt to connect with the ACS and call the Inform method.
periodic_inform_time
uinteger
no
An absolute time reference to determine when the CPE will initiate the periodic Inform method calls.
dhcp_discovery
string
no
if set to **enable**, the CPE will get the url of ACS from DHCP server Option 43.
compression
boolean
no
if set to **1**, the CPE must use the HTTP Compression when communicating with the ACS.
retry_min_wait_interval
uinteger
no
5
The minimum wait interval for session retry (in seconds)
retry_interval_multiplier
uinteger
no
2000
The retry interval multiplier for session retry session as described in the standard.
ssl_capath
string
no
The path of ssl certificates for TR-069 sessions.
insecure_enable
boolean
no
if set to **1**, the CPE skips validation of the ACS certificates.
http_disable_100continue
boolean
no
if set to **1**, disables the http 100 continue behaviour.
dhcp_url
string
no
the **url** of ACS server received from the DHCP server via Option 43. This parameter is automatically updated by daemon, When **'dhcp_discovery'** option is enabled.
ip_version
string
no
IP version of ConnectionRequestURL
get_rpc_methods
boolean
no
1
Enable/Disable optional GetRPCMethods to ACS
cpe
CWMP client configuration
false
name
type
required
default
description
enable
boolean
no
1
if set to **1**, the cwmp client will be enabled.
manufacturer
string
no
Overwrite DeviceId parameter
manufacturer_oui
string
no
Overwrite DeviceId parameter
product_class
string
no
Overwrite DeviceId parameter
serial_number
string
no
Overwrite DeviceId parameter
software_version
string
no
Overwrite DeviceId parameter
model_name
string
no
Overwrite DeviceId parameter
description
string
no
Overwrite DeviceId parameter
default_lan_interface
string
no
lan
Configure the default lan interface of the device.
default_wan_interface
string
yes
wan
Configure the default wan interface that will be used for IPv4/IPv6 connection.
interface
string
no
Use this option to define l3 device ifname directly, if this option is used default_wan_interface shall be ignored
use_curl_ifname
boolean
no
false
If this option is set, then cwmp shall use l3 device ifname as CURLOPT_INTERFACE
log_to_console
string
no
If set to **1**, the log messages will be shown in the console/stdout.
log_to_file
string
no
If set to **1**, the log messages will be saved in the log file.
log_severity
string
no
Specifies the log type to use, by default **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**.
log_file_name
string
no
/var/log/icwmpd.log
Specifies the path of the log file, by default **'/var/log/icwmpd.log'**.
log_max_size
uinteger
no
102400
Size of the log file. The default value is **102400**.
userid
string
no
The username of the device used in a connection request from ACS to CPE.
passwd
string
no
The password of the device when sending a connection request from ACS to CPE.
port
uinteger
no
7547
The port used for connection request.
path
string
no
/
CPE Connection request URI path
provisioning_code
string
no
Specifies the primary service provider and other provisioning information, which may be used by the ACS to determine service provider-specific customization and provisioning parameters.
amd_version
uinteger
no
5
Configure the amendment version to use.
instance_mode
string
no
InstanceNumber
Configure the instance mode to use. Supported instance modes are : <B>InstanceNumber</B> and <B>InstanceNumber</B>.
session_timeout
uinteger
no
60
Represents the number of seconds that should be used by the ACS as the amount of time to wait before timing out a CWMP session due to the CPE not responding.
notification
boolean
no
If set to **1**, it enables the notification feature.
exec_download
boolean
no
If set to **1**, Specifies if Download method is executed.
log_to_syslog
boolean
no
If set to **1**, the cwmp log will be appended to busybox syslog.
periodic_notify_enable
boolean
no
1
If set to **1**, icwmp will be able to detect parameter value change at any time.
periodic_notify_interval
integer
no
10
Interval in sec to check for value change notifications
custom_notify_json
string
no
Define absolute path of the JSON containing parameters on which notification get enabled as per the definition. See readme for examples.
incoming_rule
string
no
This configure firewall rules. Allowed values <IP_Only/Port_Only/IP_Port>. IP_Only means only acs ip as source ip used for firewall input rule, Port_Only means only destination port will be used and IP_Port or empty value meaning both ip and port will be used for firewall input rule.
force_ipv4
boolean
no
If set to 1, it forces the connectivity over v4 IP address.
fw_upgrade_keep_settings
boolean
no
1
If set to **1**, icwmp will keep the uci setting while doing firmware upgrade using Download RPC with '1 Firmware Upgrade Image'.
lwn
Lightweight notification configuration
false
name
type
required
default
description
enable
boolean
no
0
if set to **1**, the Lightweight Notifications will be enabled.
hostname
host
no
ACS url
The hostname or address to be used when sending the UDP Lightweight Notifications.
port
port
no
7547
The port number to be used when sending UDP Lightweight Notifications.
\ No newline at end of file + + + +
cwmp
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
section
+
+
description
+
+
multi
+
+
options
+
+
acs
+
+
Configure the ACS parameters, used by icwmp
+
+
false
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
name
+
+
type
+
+
required
+
+
default
+
+
description
+
+
url
+
+
string
+
+
yes
+
+
+
+
URL of ACS server
+
+
userid
+
+
string
+
+
no
+
+
+
+
Username for ACS server connection
+
+
passwd
+
+
string
+
+
no
+
+
+
+
Password for ACS server connection
+
+
periodic_inform_enable
+
+
boolean
+
+
no
+
+
1
+
+
If set to **1**, the CPE must periodically open session with ACS by sending Inform message to the ACS.
+
+
periodic_inform_interval
+
+
uinteger
+
+
no
+
+
86400
+
+
The duration in seconds of the interval for which the CPE must attempt to connect with the ACS and call the Inform method.
+
+
periodic_inform_time
+
+
uinteger
+
+
no
+
+
+
+
An absolute time reference to determine when the CPE will initiate the periodic Inform method calls.
+
+
dhcp_discovery
+
+
string
+
+
no
+
+
+
+
if set to **enable**, the CPE will get the url of ACS from DHCP server Option 43.
+
+
compression
+
+
boolean
+
+
no
+
+
+
+
if set to **1**, the CPE must use the HTTP Compression when communicating with the ACS.
+
+
retry_min_wait_interval
+
+
uinteger
+
+
no
+
+
5
+
+
The minimum wait interval for session retry (in seconds)
+
+
retry_interval_multiplier
+
+
uinteger
+
+
no
+
+
2000
+
+
The retry interval multiplier for session retry session as described in the standard.
+
+
ssl_capath
+
+
string
+
+
no
+
+
+
+
The path of ssl certificates for TR-069 sessions.
+
+
insecure_enable
+
+
boolean
+
+
no
+
+
+
+
if set to **1**, the CPE skips validation of the ACS certificates.
+
+
http_disable_100continue
+
+
boolean
+
+
no
+
+
+
+
if set to **1**, disables the http 100 continue behaviour.
+
+
dhcp_url
+
+
string
+
+
no
+
+
+
+
the **url** of ACS server received from the DHCP server via Option 43. This parameter is automatically updated by daemon, When **'dhcp_discovery'** option is enabled.
+
+
ip_version
+
+
string
+
+
no
+
+
+
+
IP version of ConnectionRequestURL
+
+
get_rpc_methods
+
+
boolean
+
+
no
+
+
1
+
+
Enable/Disable optional GetRPCMethods to ACS
+
+
+
cpe
+
+
CWMP client configuration
+
+
false
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
name
+
+
type
+
+
required
+
+
default
+
+
description
+
+
enable
+
+
boolean
+
+
no
+
+
1
+
+
if set to **1**, the cwmp client will be enabled.
+
+
manufacturer
+
+
string
+
+
no
+
+
+
+
Overwrite DeviceId parameter
+
+
manufacturer_oui
+
+
string
+
+
no
+
+
+
+
Overwrite DeviceId parameter
+
+
product_class
+
+
string
+
+
no
+
+
+
+
Overwrite DeviceId parameter
+
+
serial_number
+
+
string
+
+
no
+
+
+
+
Overwrite DeviceId parameter
+
+
software_version
+
+
string
+
+
no
+
+
+
+
Overwrite DeviceId parameter
+
+
model_name
+
+
string
+
+
no
+
+
+
+
Overwrite DeviceId parameter
+
+
description
+
+
string
+
+
no
+
+
+
+
Overwrite DeviceId parameter
+
+
default_lan_interface
+
+
string
+
+
no
+
+
lan
+
+
Configure the default lan interface of the device.
+
+
default_wan_interface
+
+
string
+
+
yes
+
+
wan
+
+
Configure the default wan interface that will be used for IPv4/IPv6 connection.
+
+
interface
+
+
string
+
+
no
+
+
+
+
Use this option to define l3 device ifname directly, if this option is used default_wan_interface shall be ignored
+
+
use_curl_ifname
+
+
boolean
+
+
no
+
+
false
+
+
If this option is set, then cwmp shall use l3 device ifname as CURLOPT_INTERFACE
+
+
log_to_console
+
+
string
+
+
no
+
+
+
+
If set to **1**, the log messages will be shown in the console/stdout.
+
+
log_to_file
+
+
string
+
+
no
+
+
+
+
If set to **1**, the log messages will be saved in the log file.
+
+
log_severity
+
+
string
+
+
no
+
+
+
+
Specifies the log type to use, by default **'INFO'**. The possible types are **'EMERG', 'ALERT', 'CRITIC' ,'ERROR', 'WARNING', 'NOTICE', 'INFO' and 'DEBUG'**.
+
+
log_file_name
+
+
string
+
+
no
+
+
/var/log/icwmpd.log
+
+
Specifies the path of the log file, by default **'/var/log/icwmpd.log'**.
+
+
log_max_size
+
+
uinteger
+
+
no
+
+
102400
+
+
Size of the log file. The default value is **102400**.
+
+
userid
+
+
string
+
+
no
+
+
+
+
The username of the device used in a connection request from ACS to CPE.
+
+
passwd
+
+
string
+
+
no
+
+
+
+
The password of the device when sending a connection request from ACS to CPE.
+
+
port
+
+
uinteger
+
+
no
+
+
7547
+
+
The port used for connection request.
+
+
path
+
+
string
+
+
no
+
+
/
+
+
CPE Connection request URI path
+
+
provisioning_code
+
+
string
+
+
no
+
+
+
+
Specifies the primary service provider and other provisioning information, which may be used by the ACS to determine service provider-specific customization and provisioning parameters.
+
+
amd_version
+
+
uinteger
+
+
no
+
+
5
+
+
Configure the amendment version to use.
+
+
instance_mode
+
+
string
+
+
no
+
+
InstanceNumber
+
+
Configure the instance mode to use. Supported instance modes are : <B>InstanceNumber</B> and <B>InstanceNumber</B>.
+
+
session_timeout
+
+
uinteger
+
+
no
+
+
60
+
+
Represents the number of seconds that should be used by the ACS as the amount of time to wait before timing out a CWMP session due to the CPE not responding.
+
+
notification
+
+
boolean
+
+
no
+
+
+
+
If set to **1**, it enables the notification feature.
+
+
exec_download
+
+
boolean
+
+
no
+
+
+
+
If set to **1**, Specifies if Download method is executed.
+
+
log_to_syslog
+
+
boolean
+
+
no
+
+
+
+
If set to **1**, the cwmp log will be appended to busybox syslog.
+
+
periodic_notify_enable
+
+
boolean
+
+
no
+
+
1
+
+
If set to **1**, icwmp will be able to detect parameter value change at any time.
+
+
periodic_notify_interval
+
+
integer
+
+
no
+
+
10
+
+
Interval in sec to check for value change notifications
+
+
custom_notify_json
+
+
string
+
+
no
+
+
+
+
Define absolute path of the JSON containing parameters on which notification get enabled as per the definition. See readme for examples.
+
+
incoming_rule
+
+
string
+
+
no
+
+
+
+
This configure firewall rules. Allowed values <IP_Only/Port_Only/IP_Port>. IP_Only means only acs ip as source ip used for firewall input rule, Port_Only means only destination port will be used and IP_Port or empty value meaning both ip and port will be used for firewall input rule.
+
+
force_ipv4
+
+
boolean
+
+
no
+
+
+
+
If set to 1, it forces the connectivity over v4 IP address.
+
+
fw_upgrade_keep_settings
+
+
boolean
+
+
no
+
+
1
+
+
If set to **1**, icwmp will keep the uci setting while doing firmware upgrade using Download RPC with '1 Firmware Upgrade Image'.
+
+
disable_datatype_check
+
+
boolean
+
+
no
+
+
0
+
+
If set to **1**, icwmp will skip datatype validation on SPV operations.
+
+
+
lwn
+
+
Lightweight notification configuration
+
+
false
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
name
+
+
type
+
+
required
+
+
default
+
+
description
+
+
enable
+
+
boolean
+
+
no
+
+
0
+
+
if set to **1**, the Lightweight Notifications will be enabled.
+
+
hostname
+
+
host
+
+
no
+
+
ACS url
+
+
The hostname or address to be used when sending the UDP Lightweight Notifications.
+
+
port
+
+
port
+
+
no
+
+
7547
+
+
The port number to be used when sending UDP Lightweight Notifications.
+
+
+ + + \ No newline at end of file diff --git a/schemas/uci/cwmp.json b/schemas/uci/cwmp.json index 2a4c8d9..29c2304 100644 --- a/schemas/uci/cwmp.json +++ b/schemas/uci/cwmp.json @@ -361,6 +361,13 @@ "required": "no", "default": "1", "description": "If set to **1**, icwmp will keep the uci setting while doing firmware upgrade using Download RPC with '1 Firmware Upgrade Image'." + }, + { + "name": "disable_datatype_check", + "type": "boolean", + "required": "no", + "default": "0", + "description": "If set to **1**, icwmp will skip datatype validation on SPV operations." } ] }, diff --git a/src/common.h b/src/common.h index 9524ec2..75b7540 100644 --- a/src/common.h +++ b/src/common.h @@ -147,6 +147,7 @@ typedef struct config { int clock_sync_timeout; bool force_ipv4; bool fw_upgrade_keep_settings; + bool cpe_disable_datatype_check; bool lwn_enable; int lwn_port; diff --git a/src/datamodel_interface.c b/src/datamodel_interface.c index b145a8c..e9fdfd7 100755 --- a/src/datamodel_interface.c +++ b/src/datamodel_interface.c @@ -719,7 +719,9 @@ int cwmp_set_parameter_value(const char *parameter_name, const char *parameter_v bb_add_string(&b, "path", inst_path); bb_add_string(&b, "value", parameter_value); - bb_add_string(&b, "datatype", type ? type : ""); + if (cwmp_ctx.conf.cpe_disable_datatype_check == false) { + bb_add_string(&b, "datatype", type ? type : ""); + } prepare_optional_table(&b); int e = icwmp_ubus_invoke(BBFDM_OBJECT_NAME, "set", b.head, ubus_set_value_callback, &set_result); diff --git a/src/uci_utils.c b/src/uci_utils.c index b03c266..ea7a2e8 100644 --- a/src/uci_utils.c +++ b/src/uci_utils.c @@ -242,6 +242,7 @@ static void config_get_cpe_elements(struct uci_section *s) UCI_CPE_CLOCK_SYNC_TIMEOUT, UCI_CPE_ENABLE, UCI_CPE_USE_CURL_IFNAME, + UCI_CPE_DISABLE_DATATYPE_CHECK, __MAX_NUM_UCI_CPE_ATTRS, }; @@ -267,7 +268,8 @@ static void config_get_cpe_elements(struct uci_section *s) [UCI_CPE_INTERFACE] = { .name = "interface", .type = UCI_TYPE_STRING }, [UCI_CPE_CLOCK_SYNC_TIMEOUT] = { .name = "clock_sync_timeout", .type = UCI_TYPE_STRING }, [UCI_CPE_ENABLE] = { .name = "enable", .type = UCI_TYPE_STRING }, - [UCI_CPE_USE_CURL_IFNAME] = { .name = "use_curl_ifname", .type = UCI_TYPE_STRING } + [UCI_CPE_USE_CURL_IFNAME] = { .name = "use_curl_ifname", .type = UCI_TYPE_STRING }, + [UCI_CPE_DISABLE_DATATYPE_CHECK] = { .name = "disable_datatype_check", .type = UCI_TYPE_STRING } }; struct uci_option *cpe_tb[__MAX_NUM_UCI_CPE_ATTRS]; @@ -412,6 +414,9 @@ static void config_get_cpe_elements(struct uci_section *s) } CWMP_LOG(DEBUG, "CWMP CONFIG - cpe enable: %d", cwmp_ctx.conf.enable); + + cwmp_ctx.conf.cpe_disable_datatype_check = str_to_bool(get_value_from_uci_option(cpe_tb[UCI_CPE_DISABLE_DATATYPE_CHECK])); + CWMP_LOG(DEBUG, "CWMP CONFIG - cpe datatype validation: %d", cwmp_ctx.conf.cpe_disable_datatype_check); } static void config_get_lwn_elements(struct uci_section *s)