Mod aaa-12 修改静态路由IPV6获取显示问题

SOL
修改人:tongyebin
检视人:
This commit is contained in:
tongyebin 2019-09-17 17:57:52 +08:00
parent e4ee5296a2
commit bf6d2816db
1 changed files with 12 additions and 4 deletions

View File

@ -1437,8 +1437,16 @@ ret_code all_routing_get_all(uint source,
rpc_log_info("check 6: destip %s gateway %s netmask %d metric %d dev %s\n",destip,gateway,netmask_int,metric,dev); rpc_log_info("check 6: destip %s gateway %s netmask %d metric %d dev %s\n",destip,gateway,netmask_int,metric,dev);
if(metric > 0) if(metric > 0)
{
if(strstr(gateway,"[") == NULL)
{
strcpy(gateway_new,gateway);
}
else
{ {
sscanf(gateway,"[%20[^]]",gateway_new); sscanf(gateway,"[%20[^]]",gateway_new);
}
conf_buff[count].version = 6; conf_buff[count].version = 6;
if (strcmp(destip,"[::]") == 0) if (strcmp(destip,"[::]") == 0)
{ {