Mod aaa-12 修改IPV4校验逻辑

SOL
修改人:tongyebin
检视人:
This commit is contained in:
tongyebin 2019-08-30 09:23:40 +08:00
parent a5d88222d5
commit 319101243a
1 changed files with 30 additions and 28 deletions

View File

@ -1042,25 +1042,9 @@ ret_code routing_config_chk(uint source, uint *config_type,
if((conf_buff->version != IPV4_VERSION) && (conf_buff->version != IPV6_VERSION))
{
return RET_CHKERR;
}
else if(strcmp(conf_buff->gateway,"") == 0 && strcmp(conf_buff->dev,"") == 0)
{
rpc_log_info(" gateway and dev are NULL\n");
return RET_CHKERR;
}
}
else if ((*config_type == CM_CONFIG_GET_ALL))
{
if ((*output_len)<(ROUTING_TABLE_MAX_NUMBER * sizeof(routing_t)))
{
rpc_log_info("getall check error\n");
return RET_CHKERR;
}
}
if(conf_buff->version == IPV4_VERSION)
else if(conf_buff->version == IPV4_VERSION)
{
int a = -1,b = -1,c = -1,d = -1;
int a1 = -1,b1 = -1,c1 = -1,d1 = -1;
@ -1082,12 +1066,30 @@ ret_code routing_config_chk(uint source, uint *config_type,
}
}
else if(strcmp(conf_buff->gateway,"") == 0 && strcmp(conf_buff->dev,"") == 0)
{
rpc_log_info(" gateway and dev are NULL\n");
return RET_CHKERR;
}
}
else if ((*config_type == CM_CONFIG_GET_ALL))
{
if ((*output_len)<(ROUTING_TABLE_MAX_NUMBER * sizeof(routing_t)))
{
rpc_log_info("getall check error\n");
return RET_CHKERR;
}
}
else
{
return RET_CHKERR;
}
if(conf_length <= CM_BUFF_SIZE)
{
*input_len = conf_length;