mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-07 20:23:03 +08:00
修复IpPool
This commit is contained in:
@@ -94,7 +94,9 @@ func AcquireIp(username, macAddr string) net.IP {
|
||||
// 跳过活跃连接
|
||||
// _, ok := ipActive[ipStr]
|
||||
// 检测原有ip是否在新的ip池内
|
||||
if IpPool.Ipv4IPNet.Contains(ip) {
|
||||
if IpPool.Ipv4IPNet.Contains(ip) &&
|
||||
utils.Ip2long(ip) >= IpPool.IpLongMin &&
|
||||
utils.Ip2long(ip) <= IpPool.IpLongMax {
|
||||
mi.Username = username
|
||||
mi.LastLogin = tNow
|
||||
// 回写db数据
|
||||
|
Reference in New Issue
Block a user