mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
bbf: add the missing pattern => "^$"
This commit is contained in:
parent
3b0a5a08f0
commit
9c70a16884
17 changed files with 231 additions and 126 deletions
|
|
@ -1014,7 +1014,7 @@ static int set_DHCPv4ServerPool_MinAddress(char *refparam, struct dmctx *ctx, vo
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1073,7 +1073,7 @@ static int set_DHCPv4ServerPool_MaxAddress(char *refparam, struct dmctx *ctx, vo
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -1148,7 +1148,7 @@ static int set_DHCPv4ServerPool_ReservedAddresses(char *refparam, struct dmctx *
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string_list(value, -1, 32, -1, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string_list(value, -1, 32, -1, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
|
||||
local_value = dmstrdup(value);
|
||||
|
|
@ -1225,7 +1225,7 @@ static int set_DHCPv4ServerPool_SubnetMask(char *refparam, struct dmctx *ctx, vo
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -1269,7 +1269,7 @@ static int set_DHCPv4ServerPool_DNSServers(char *refparam, struct dmctx *ctx, vo
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string_list(value, -1, 4, -1, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string_list(value, -1, 4, -1, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -1348,7 +1348,7 @@ static int set_DHCPv4ServerPool_IPRouters(char *refparam, struct dmctx *ctx, voi
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string_list(value, -1, 4, -1, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string_list(value, -1, 4, -1, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -1536,7 +1536,7 @@ static int set_DHCPv4ServerPoolStaticAddress_Chaddr(char *refparam, struct dmctx
|
|||
switch (action) {
|
||||
case VALUECHECK:
|
||||
// Validate value string -> MAC Address
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
|
||||
// Check if mac exists
|
||||
|
|
@ -1567,7 +1567,7 @@ static int set_DHCPv4ServerPoolStaticAddress_Yiaddr(char *refparam, struct dmctx
|
|||
switch (action) {
|
||||
case VALUECHECK:
|
||||
// Validate value string -> IPv4 Address
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
|
||||
// Check if ip address is out dhcp pool
|
||||
|
|
@ -2490,7 +2490,7 @@ static int set_DHCPv4RelayForwarding_Chaddr(char *refparam, struct dmctx *ctx, v
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -2514,7 +2514,7 @@ static int set_DHCPv4RelayForwarding_ChaddrMask(char *refparam, struct dmctx *ct
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -951,7 +951,7 @@ static int set_DHCPv6ServerPool_SourceAddress(char *refparam, struct dmctx *ctx,
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 1))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -975,7 +975,7 @@ static int set_DHCPv6ServerPool_SourceAddressMask(char *refparam, struct dmctx *
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 1))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ static int set_dns_server(char *refparam, struct dmctx *ctx, void *data, char *i
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 2))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -1131,7 +1131,7 @@ static int set_rule_dest_ip(char *refparam, struct dmctx *ctx, void *data, char
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 2))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1154,7 +1154,7 @@ static int set_rule_dest_mask(char *refparam, struct dmctx *ctx, void *data, cha
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 3))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 4))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1178,7 +1178,7 @@ static int set_rule_source_ip(char *refparam, struct dmctx *ctx, void *data, cha
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 2))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1201,7 +1201,7 @@ static int set_rule_source_mask(char *refparam, struct dmctx *ctx, void *data, c
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 3))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 4))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -735,7 +735,7 @@ static int set_IEEE1905ALForwardingTableForwardingRule_MACDestinationAddress(cha
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -780,7 +780,7 @@ static int set_IEEE1905ALForwardingTableForwardingRule_MACSourceAddress(char *re
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -1174,7 +1174,7 @@ static int set_IP_ULAPrefix(char *refparam, struct dmctx *ctx, void *data, char
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 1))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1792,7 +1792,7 @@ static int set_IPInterfaceIPv4Address_IPAddress(char *refparam, struct dmctx *ct
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1827,7 +1827,7 @@ static int set_IPInterfaceIPv4Address_SubnetMask(char *refparam, struct dmctx *c
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1993,7 +1993,7 @@ static int set_IPInterfaceIPv6Address_IPAddress(char *refparam, struct dmctx *ct
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 1))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -2207,7 +2207,7 @@ static int set_IPInterfaceIPv6Prefix_Prefix(char *refparam, struct dmctx *ctx, v
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 1))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -2279,7 +2279,7 @@ static int set_IPInterfaceIPv6Prefix_ChildPrefixBits(char *refparam, struct dmct
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 1))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#include "lanconfigsecurity.h"
|
||||
|
||||
/*#Device.LANConfigSecurity.ConfigPassword!UCI:users/user,user/password*/
|
||||
static int get_LANConfigSecurity_ConfigPassword(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value="";
|
||||
*value = "";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -879,9 +879,7 @@ int os_set_QoSClassification_DestMask(char *refparam, struct dmctx *ctx, void *d
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (value[0] == '\0')
|
||||
break;
|
||||
if (dm_validate_string(value, -1, 49 , NULL, 0, IPPrefix, 3) != 0)
|
||||
if (dm_validate_string(value, -1, 49 , NULL, 0, IPPrefix, 4))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -957,9 +955,7 @@ int os_set_QoSClassification_SourceMask(char *refparam, struct dmctx *ctx, void
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (value[0] == '\0')
|
||||
break;
|
||||
if (dm_validate_string(value, -1, 49 , NULL, 0, IPPrefix, 3) != 0)
|
||||
if (dm_validate_string(value, -1, 49 , NULL, 0, IPPrefix, 4))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1055,9 +1051,7 @@ int os_set_QoSClassification_DestIP(char *refparam, struct dmctx *ctx, void *dat
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (value[0] == '\0')
|
||||
break;
|
||||
else if (dm_validate_string(value, -1, 45 , NULL, 0, IPAddress, 2) != 0)
|
||||
if (dm_validate_string(value, -1, 45 , NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1095,9 +1089,7 @@ int os_set_QoSClassification_SourceIP(char *refparam, struct dmctx *ctx, void *d
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (value[0] == '\0')
|
||||
break;
|
||||
else if (dm_validate_string(value, -1, 45 , NULL, 0, IPAddress, 2) != 0)
|
||||
if (dm_validate_string(value, -1, 45 , NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1267,7 +1259,7 @@ int os_set_QoSClassification_SourceMACAddress(char *refparam, struct dmctx *ctx,
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1323,7 +1315,7 @@ int os_set_QoSClassification_DestMACAddress(char *refparam, struct dmctx *ctx, v
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -803,7 +803,7 @@ int os_set_QoSClassification_DestMask(char *refparam, struct dmctx *ctx, void *d
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 3))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 4))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -844,7 +844,7 @@ int os_set_QoSClassification_SourceMask(char *refparam, struct dmctx *ctx, void
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 3))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPPrefix, 4))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -929,7 +929,7 @@ int os_set_QoSClassification_DestIP(char *refparam, struct dmctx *ctx, void *dat
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 2))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -955,7 +955,7 @@ int os_set_QoSClassification_SourceIP(char *refparam, struct dmctx *ctx, void *d
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 2))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1112,7 +1112,7 @@ int os_set_QoSClassification_SourceMACAddress(char *refparam, struct dmctx *ctx,
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1132,7 +1132,7 @@ int set_QoSClassification_SourceMACMask(char *refparam, struct dmctx *ctx, void
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1173,7 +1173,7 @@ int os_set_QoSClassification_DestMACAddress(char *refparam, struct dmctx *ctx, v
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1193,7 +1193,7 @@ int set_QoSClassification_DestMACMask(char *refparam, struct dmctx *ctx, void *d
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string(value, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ static int set_router_ipv4forwarding_destip(char *refparam, struct dmctx *ctx, v
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -599,7 +599,7 @@ static int set_router_ipv4forwarding_destmask(char *refparam, struct dmctx *ctx,
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -653,7 +653,7 @@ static int set_router_ipv4forwarding_gatewayip(char *refparam, struct dmctx *ctx
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -754,7 +754,7 @@ static int set_RoutingRouterIPv6Forwarding_DestIPPrefix(char *refparam, struct d
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 1))
|
||||
if (dm_validate_string(value, -1, 49, NULL, 0, IPv6Prefix, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -794,7 +794,7 @@ static int set_RoutingRouterIPv6Forwarding_NextHop(char *refparam, struct dmctx
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 1))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 2))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ static int set_WiFiAccessPoint_AllowedMACAddress(char *refparam, struct dmctx *c
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string_list(value, -1, -1, -1, -1, 17, NULL, 0, MACAddress, 1))
|
||||
if (dm_validate_string_list(value, -1, -1, -1, -1, 17, NULL, 0, MACAddress, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
@ -1094,7 +1094,7 @@ static int set_access_point_security_radius_ip_address(char *refparam, struct dm
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 2))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
|
|
@ -1330,7 +1330,7 @@ static int set_WiFiAccessPointAccounting_ServerIPAddr(char *refparam, struct dmc
|
|||
{
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 2))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPAddress, 3))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -714,7 +714,7 @@ int set_mcasts_filter_address(char *refparam, struct dmctx *ctx, void *data, cha
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
|
||||
break;
|
||||
|
|
@ -1273,7 +1273,7 @@ static int set_igmpp_filter_address(char *refparam, struct dmctx *ctx, void *dat
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 1))
|
||||
if (dm_validate_string(value, -1, 15, NULL, 0, IPv4Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ static int set_mldp_filter_address(char *refparam, struct dmctx *ctx, void *data
|
|||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 1))
|
||||
if (dm_validate_string(value, -1, 45, NULL, 0, IPv6Address, 2))
|
||||
return FAULT_9007;
|
||||
break;
|
||||
case VALUESET:
|
||||
|
|
|
|||
|
|
@ -243,16 +243,16 @@ def generate_validate_value(dmparam, value):
|
|||
printGlobalstrCommon(str_pattern)
|
||||
elif datatypeparam == "IPAddress":
|
||||
patternparam = "IPAddress"
|
||||
pattern_length = "2"
|
||||
pattern_length = "3"
|
||||
elif datatypeparam == "IPv6Address":
|
||||
patternparam = "IPv6Address"
|
||||
pattern_length = "1"
|
||||
pattern_length = "2"
|
||||
elif datatypeparam == "IPPrefix":
|
||||
patternparam = "IPPrefix"
|
||||
pattern_length = "3"
|
||||
pattern_length = "4"
|
||||
elif datatypeparam == "IPv6Prefix":
|
||||
patternparam = "IPv6Prefix"
|
||||
pattern_length = "1"
|
||||
pattern_length = "2"
|
||||
else:
|
||||
patternparam = "NULL"
|
||||
pattern_length = "0"
|
||||
|
|
@ -309,16 +309,16 @@ def generate_validate_value(dmparam, value):
|
|||
printGlobalstrCommon(str_pattern)
|
||||
elif datatypeparam == "IPAddress":
|
||||
patternparam = "IPAddress"
|
||||
pattern_length = "2"
|
||||
pattern_length = "3"
|
||||
elif datatypeparam == "IPv6Address":
|
||||
patternparam = "IPv6Address"
|
||||
pattern_length = "1"
|
||||
pattern_length = "2"
|
||||
elif datatypeparam == "IPPrefix":
|
||||
patternparam = "IPPrefix"
|
||||
pattern_length = "3"
|
||||
pattern_length = "4"
|
||||
elif datatypeparam == "IPv6Prefix":
|
||||
patternparam = "IPv6Prefix"
|
||||
pattern_length = "1"
|
||||
pattern_length = "2"
|
||||
else:
|
||||
patternparam = "NULL"
|
||||
pattern_length = "0"
|
||||
|
|
|
|||
212
json/tr181.json
212
json/tr181.json
File diff suppressed because it is too large
Load diff
|
|
@ -54,13 +54,13 @@ char *PIN[] = {"^\\d{4}|\\d{8}$"};
|
|||
char *DestinationAddress[] = {"^\\d+/\\d+$"};
|
||||
char *RegulatoryDomain[] = {"^[A-Z][A-Z][ OI]$"};
|
||||
char *ConformingAction[] = {"^Null$", "^Drop$", "^[0-9]|[1-5][0-9]|6[0-3]$", "^:[0-7]$", "^([0-9]|[1-5][0-9]|6[0-3]):[0-7]$"};
|
||||
char *IPv4Address[] = {"^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$"};
|
||||
char *IPv6Address[] = {"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$"};
|
||||
char *IPAddress[] = {"^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$", "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$"};
|
||||
char *MACAddress[] = {"^([0-9A-Fa-f][0-9A-Fa-f]:){5}([0-9A-Fa-f][0-9A-Fa-f])$"};
|
||||
char *IPPrefix[] = {"^/(3[0-2]|[012]?[0-9])$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/(3[0-2]|[012]?[0-9])$", "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/(12[0-8]|1[0-1][0-9]|[0-9]?[0-9])$"};
|
||||
char *IPv4Prefix[] = {"^/(3[0-2]|[012]?[0-9])$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/(3[0-2]|[012]?[0-9])$"};
|
||||
char *IPv6Prefix[] = {"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/(12[0-8]|1[0-1][0-9]|[0-9]?[0-9])$"};
|
||||
char *IPv4Address[] = {"^$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$"};
|
||||
char *IPv6Address[] = {"^$", "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$"};
|
||||
char *IPAddress[] = {"^$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$", "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$"};
|
||||
char *MACAddress[] = {"^$", "^([0-9A-Fa-f][0-9A-Fa-f]:){5}([0-9A-Fa-f][0-9A-Fa-f])$"};
|
||||
char *IPPrefix[] = {"^$", "^/(3[0-2]|[012]?[0-9])$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/(3[0-2]|[012]?[0-9])$", "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/(12[0-8]|1[0-1][0-9]|[0-9]?[0-9])$"};
|
||||
char *IPv4Prefix[] = {"^$", "^/(3[0-2]|[012]?[0-9])$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/(3[0-2]|[012]?[0-9])$"};
|
||||
char *IPv6Prefix[] = {"^$", "^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/(12[0-8]|1[0-1][0-9]|[0-9]?[0-9])$"};
|
||||
|
||||
pid_t get_pid(const char *pname)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ def getMinMaxEnumerationUnitPatternparam(paramtype, c):
|
|||
else:
|
||||
paramenum = "%s, \"%s\"" % (paramenum, cc.get('value'))
|
||||
if cc.tag == "pattern":
|
||||
if parampattern == None and cc.get('value') != "":
|
||||
if parampattern == None:
|
||||
parampattern = "\"%s\"" % cc.get('value')
|
||||
elif cc.get('value') != "":
|
||||
parampattern = "%s,\"%s\"" % (parampattern, cc.get('value'))
|
||||
|
|
@ -152,7 +152,7 @@ def getparamdatatyperef( datatyperef ):
|
|||
paramenum = "\"%s\"" % dd.get('value')
|
||||
else:
|
||||
paramenum = "%s, \"%s\"" % (paramenum, dd.get('value'))
|
||||
if dd.tag == "pattern" and dd.get('value') != "":
|
||||
if dd.tag == "pattern":
|
||||
if parampattern == None:
|
||||
parampattern = "\"%s\"" % dd.get('value')
|
||||
elif dd.get('value') != "":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue