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

Fix #9: Handle TXT Records correctly #10

Merged
merged 4 commits into from
Jan 12, 2022

Conversation

alessionossa
Copy link
Contributor

@alessionossa alessionossa commented Dec 29, 2021

As stated at https://datatracker.ietf.org/doc/html/rfc6763#section-6.1 , TXT Record payload can be composed by multiple components (key/value pairs) that are preceded by a 8-bit integer indicating the length of the key/value pair.

An example of TXT Record is ( https://datatracker.ietf.org/doc/html/rfc6763#section-6.6 ):

0x09 key=value 0x08 paper=A4 0x07 passreq

This pull request fixes #9 . Also fixes IP Address to string conversion, since the IP Address returned was reversed and includes #8 .

With the current version, of SwiftNIO it throws compile error:
`~/NioDNS/Sources/DNSClient/DNSClient+Connect.swift:68:22: Value of type 'SocketAddress' has no member 'protocol'`
@Joannis Joannis merged commit e9ed572 into orlandos-nl:master Jan 12, 2022
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

Successfully merging this pull request may close these issues.

ProtocolError while decoding response
2 participants