parent
a5d88222d5
commit
319101243a
|
@ -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))
|
if((conf_buff->version != IPV4_VERSION) && (conf_buff->version != IPV6_VERSION))
|
||||||
{
|
{
|
||||||
return RET_CHKERR;
|
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(conf_buff->version == IPV4_VERSION)
|
||||||
|
|
||||||
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)
|
|
||||||
{
|
{
|
||||||
int a = -1,b = -1,c = -1,d = -1;
|
int a = -1,b = -1,c = -1,d = -1;
|
||||||
int a1 = -1,b1 = -1,c1 = -1,d1 = -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
|
else
|
||||||
{
|
{
|
||||||
return RET_CHKERR;
|
return RET_CHKERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(conf_length <= CM_BUFF_SIZE)
|
if(conf_length <= CM_BUFF_SIZE)
|
||||||
{
|
{
|
||||||
*input_len = conf_length;
|
*input_len = conf_length;
|
||||||
|
|
Loading…
Reference in New Issue