allow_addr?(addr)
public
Allow connections from addrinfo addr? It must be formatted like
Socket#peeraddr:
["AF_INET", 10, "lc630", "192.0.2.1"]
Show source
def allow_addr?(addr)
case @order
when DENY_ALLOW
return true if @allow.match(addr)
return false if @deny.match(addr)
return true
when ALLOW_DENY
return false if @deny.match(addr)
return true if @allow.match(addr)
return false
else
false
end
end