Browse Source

fix:ip段修改

duxin 1 year ago
parent
commit
2fc66b18db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ipmatch/ipmatch.go

+ 1 - 1
ipmatch/ipmatch.go

@@ -50,7 +50,7 @@ func NewRb(ips []IpParameter) *WhiteIp {
 			if ipUint, err := ip2Uint32(ipData.Ip); err == nil {
 				rb.Add(ipUint)
 			}
-		} else if ipData.IpType == 1 && isIPv4Segment(ipData.Ip) { //ip段添加
+		} else if ipData.IpType == 2 && isIPv4Segment(ipData.Ip) { //ip段添加
 			for _, v := range cidrToIPList(ipData.Ip) {
 				if ipUint, err1 := ip2Uint32(v); err1 == nil {
 					rb.Add(ipUint)