Mod aaa-12 修改用户认证-配置管理

RCA:
SOL:
修改人:chenling
检视人:
This commit is contained in:
ChenLing 2019-09-10 11:25:14 +08:00
parent 8756177690
commit 3121ffeecb
1 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ int isBroadcastIpV4Addr(const char *ipAddr)
if((NULL == ipAddr) || (0 == strlen(ipAddr)))
{
return 1;
return 0;
}
if(4 == sscanf(ipAddr,"%d.%d.%d.%d", &ip_part_1, &ip_part_2, &ip_part_3, &ip_part_4))
@ -62,11 +62,11 @@ int isBroadcastIpV4Addr(const char *ipAddr)
if((ip_part_1 = 255) &&(ip_part_2 = 255) &&
(ip_part_3 = 255) &&(ip_part_4 = 255))
{
return 0;
return 1;
}
}
return 1;
return 0;
}
int isIpV4Addr(const char *ipAddr)
@ -551,7 +551,7 @@ ret_code freeauth_config_add_proc(uint source, uint config_type,
inet_ntop(AF_INET,&freeauth_configure->sip, str, sizeof(str));
printf("%s\n", str);
/*校验源ip地址*/
/*校验源ip地址 两种错误情况:ip地址不符合返回值为1 ip地址为255.255.255.255 返回值为1*/
if((1 == isIpV4Addr(str)) || (0 == isBroadcastIpV4Addr(str)) ) {
char *ret_char = NULL;
unsigned int ret_int = 0;