parent
fdf6b16917
commit
d2aff196b3
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue