parent
30ec3fac77
commit
562d5c3b6a
|
@ -1044,6 +1044,12 @@ ret_code routing_config_chk(uint source, uint *config_type,
|
||||||
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(conf_buff->version == IPV4_VERSION)
|
||||||
{
|
{
|
||||||
int a = -1,b = -1,c = -1,d = -1;
|
int a = -1,b = -1,c = -1,d = -1;
|
||||||
|
@ -1052,7 +1058,7 @@ ret_code routing_config_chk(uint source, uint *config_type,
|
||||||
if(a<0 || a>255 || b<0 || b>255 || c<0 || c>255 || d<0 |d>255)
|
if(a<0 || a>255 || b<0 || b>255 || c<0 || c>255 || d<0 |d>255)
|
||||||
{
|
{
|
||||||
rpc_log_info("ip address wrong:%d %d %d %d\n",a,b,c,d);
|
rpc_log_info("ip address wrong:%d %d %d %d\n",a,b,c,d);
|
||||||
return RET_INPUTERR;
|
return RET_CHKERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strcmp(conf_buff->gateway,"") != 0)
|
if(strcmp(conf_buff->gateway,"") != 0)
|
||||||
|
@ -1061,16 +1067,10 @@ ret_code routing_config_chk(uint source, uint *config_type,
|
||||||
if(a1<0 || a1>255 || b1<0 || b1>255 || c1<0 || c1>255 || d1<0 |d1>255)
|
if(a1<0 || a1>255 || b1<0 || b1>255 || c1<0 || c1>255 || d1<0 |d1>255)
|
||||||
{
|
{
|
||||||
rpc_log_info("gateway address wrong:%d %d %d %d\n",a1,b1,c1,d1);
|
rpc_log_info("gateway address wrong:%d %d %d %d\n",a1,b1,c1,d1);
|
||||||
return RET_INPUTERR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else if(strcmp(conf_buff->gateway,"") == 0 && strcmp(conf_buff->dev,"") == 0)
|
|
||||||
{
|
|
||||||
rpc_log_info(" gateway and dev are NULL\n");
|
|
||||||
return RET_CHKERR;
|
return RET_CHKERR;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1089,7 +1089,6 @@ ret_code routing_config_chk(uint source, uint *config_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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