reapply patch for nslookup 9.6 that was remove with bosh merge. Fixes #4677
This commit is contained in:
parent
9b2382cd0e
commit
6b2a816143
|
@ -226,13 +226,20 @@ class NSLookupResolver(CommonResolver):
|
||||||
# _xmpp-client._tcp.jabber.org service = 30 30 5222 jabber.org.
|
# _xmpp-client._tcp.jabber.org service = 30 30 5222 jabber.org.
|
||||||
if not result:
|
if not result:
|
||||||
return []
|
return []
|
||||||
|
ufqdn = helpers.ascii_to_idn(fqdn) # Unicode domain name
|
||||||
hosts = []
|
hosts = []
|
||||||
lines = result.split('\n')
|
lines = result.split('\n')
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if line == '':
|
if line == '':
|
||||||
continue
|
continue
|
||||||
|
domain = None
|
||||||
if line.startswith(fqdn):
|
if line.startswith(fqdn):
|
||||||
rest = line[len(fqdn):].split('=')
|
domain = fqdn # For nslookup 9.5
|
||||||
|
elif helpers.decode_string(line).startswith(ufqdn):
|
||||||
|
line = helpers.decode_string(line)
|
||||||
|
domain = ufqdn # For nslookup 9.6
|
||||||
|
if domain
|
||||||
|
rest = line[len(domain):].split('=')
|
||||||
if len(rest) != 2:
|
if len(rest) != 2:
|
||||||
continue
|
continue
|
||||||
answer_type, props_str = rest
|
answer_type, props_str = rest
|
||||||
|
|
Loading…
Reference in New Issue