Mod aaa-12 修改静态路由静态检查警告

SOL
修改人:tongyebin
检视人:
This commit is contained in:
tongyebin 2019-09-20 16:24:00 +08:00
parent fdf6b16917
commit d2aff196b3
1 changed files with 11 additions and 4 deletions

View File

@ -30,6 +30,11 @@ extern int conf_file_write(char *conf_path, char *sum_buf);
ret_code routing_to_json(int count, routing_t *buff_total, pointer output, int *output_len)
{
if (NULL == buff_total)
{
return RET_EMPTY_STRING;
}
ret_code ret = RET_OK;
char *json_routing;
@ -658,7 +663,7 @@ ret_code routing_add(routing_t *conf_buff)
char string[STRING_LENGTH] = {0};
uint version_t = conf_buff->version;
uint netmask_t = conf_buff->netmask;
char route_type[10] = {0};
//char route_type[10] = {0};
ret_code ret = RET_OK;
char *destip_t = conf_buff->destip;
char *gw_t = conf_buff->gateway;
@ -677,7 +682,8 @@ ret_code routing_add(routing_t *conf_buff)
rpc_log_info("flag: %d\n",flag);
if(version_t == IPV4_VERSION)
{
{
char route_type[10] = {0};
if (netmask_t > IPV4_MIN_NETMASK && netmask_t < IPV4_MAX_NETMASK)
{
strcpy(route_type,"-net");
@ -746,7 +752,7 @@ ret_code routing_del(routing_t *conf_buff)
char string_del[STRING_LENGTH] = {0};
uint version_t = conf_buff->version;
uint netmask_t = conf_buff->netmask;
char route_type[10] = {0};
//char route_type[10] = {0};
ret_code ret = RET_OK;
char *destip_t = conf_buff->destip;
char *gw_t = conf_buff->gateway;
@ -758,6 +764,7 @@ ret_code routing_del(routing_t *conf_buff)
if(version_t == IPV4_VERSION)
{
char route_type[10] = {0};
if (netmask_t > IPV4_MIN_NETMASK && netmask_t < IPV4_MAX_NETMASK)
{
strcpy(route_type,"-net");
@ -1204,7 +1211,7 @@ ret_code routing_config_proc(uint source, uint config_type,
uint conf_type = config_type;
routing_t conf_buff = {0};
routing_t *routing_conf = &conf_buff;
int flag = 0;
//int flag = 0;
if(NULL == input)
{