Mod aaa-12 修改静态路由metric校验机制

SOL
修改人:tongyebin
检视人:
This commit is contained in:
tongyebin 2019-08-29 10:24:11 +08:00
parent 8e6ce1e4d3
commit 91bcb83422
1 changed files with 5 additions and 1 deletions

View File

@ -203,7 +203,7 @@ ret_code routing_json_parse(pointer input, uint *conf_type, routing_t *conf_buff
{
return RET_INPUTERR;
}
if((metric->valueint) < 1)
if((metric->valueint) < 0)
{
return RET_INPUTERR;
}
@ -659,6 +659,10 @@ ret_code routing_add(routing_t *conf_buff)
else if (version_t == IPV6_VERSION)
{
if (metric_t < 1)
{
return RET_INPUTERR;
}
if(netmask_t < 0 || netmask_t >128)
{
return RET_INPUTERR;