Răsfoiți Sursa

fix:ip段修改

duxin 1 an în urmă
părinte
comite
2fc66b18db
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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)