3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 22:09:24 +01:00

Merge pull request #672 from slingamn/issue671

fix #671
This commit is contained in:
Shivaram Lingamneni 2019-11-23 22:09:37 -05:00 committed by GitHub
commit c6bd0aea8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,6 +243,9 @@ func (dm *DLineManager) RemoveIP(addr net.IP) error {
// CheckIP returns whether or not an IP address was banned, and how long it is banned for. // CheckIP returns whether or not an IP address was banned, and how long it is banned for.
func (dm *DLineManager) CheckIP(addr net.IP) (isBanned bool, info IPBanInfo) { func (dm *DLineManager) CheckIP(addr net.IP) (isBanned bool, info IPBanInfo) {
addr = addr.To16() // almost certainly unnecessary addr = addr.To16() // almost certainly unnecessary
if addr.IsLoopback() {
return // #671
}
dm.RLock() dm.RLock()
defer dm.RUnlock() defer dm.RUnlock()