|
@@ -68,7 +68,7 @@ class MsgHandler(SocketServer.BaseRequestHandler):
|
|
|
def resolve_name(self, ipaddr):
|
|
|
"""
|
|
|
Resolves the host name of the given IP address
|
|
|
- and strips away the suffix (.infra)?.ffpb
|
|
|
+ and strips away the suffix ((.srv)?.infra)?.ffpb
|
|
|
"""
|
|
|
|
|
|
if ipaddr.startswith("127."):
|
|
@@ -76,7 +76,7 @@ class MsgHandler(SocketServer.BaseRequestHandler):
|
|
|
|
|
|
try:
|
|
|
addr = dns.reversename.from_address(ipaddr)
|
|
|
- return re.sub("(.infra)?.ffpb.", "", str(ffpb_resolver.query(addr, "PTR")[0]))
|
|
|
+ return re.sub("((.srv)?.infra)?.ffpb.", "", str(ffpb_resolver.query(addr, "PTR")[0]))
|
|
|
except dns.resolver.NXDOMAIN:
|
|
|
return ipaddr
|
|
|
|