Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNSListener IPv6 AAAA request support #130

Open
strictlymike opened this issue Aug 28, 2019 · 0 comments
Open

DNSListener IPv6 AAAA request support #130

strictlymike opened this issue Aug 28, 2019 · 0 comments

Comments

@strictlymike
Copy link
Collaborator

Matt Williams proposes DNS IPv6 AAAA request support. This ticket proposes a code snippet for consideration (credit: Matt Williams). We should also add a test to the test suite and perform one-time validation using a native sample if one can be found.

elif qtype == 'AAAA':
    for addrinfo in socket.getaddrinfo(socket.gethostname(), 0, socket.AF_INET6):
        sockaddr = addrinfo[4]
        address = sockaddr[0]
        if '%' in address:
            address = address.split('%')[0]
        
        self.server.logger.debug('Responding with \'%s\'',
                                  address)
    
        response.add_answer(RR(qname, getattr(QTYPE,qtype), rdata=RDMAP[qtype](address)))
        break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant