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

Track option types more accurately #16

Merged
merged 2 commits into from
Apr 9, 2021
Merged

Track option types more accurately #16

merged 2 commits into from
Apr 9, 2021

Conversation

kirelagin
Copy link
Collaborator

Fixes #14.

@em0lar, does this work for your use case?

@kirelagin kirelagin force-pushed the string-length branch 2 times, most recently from 876f4f9 to 53ae0a7 Compare April 9, 2021 04:43
Turns out, strings in DNS zones have size limitations. In particular,
domain names cannot be longer than 255 octets. Some other strings, such
as data in TXT records, are not limited in length, but the STRING
LITERALS used in zone files are limited to 255 octets.

* Annotate each record file with a reference to the corresponding RFC.
* Add a new option type (lib.dns.types.domain-name), which is a string
  limited to 255 characters.
* Use the new `domain-name` type instead of `str` where appropriate.
* Add a helper util that breaks a string of aribtrary length into
  multiple string literals, each no longer than 255 characters.
* Use the new helper where appropriate (I hope).
@leona-ya
Copy link

leona-ya commented Apr 9, 2021

Thanks, it works perfectly!

Show the type correctly (it had a wrong why from an earlier versions)
and explain more clearly what the function actually does, in particular
that it qutoes the string, so one doesn’t need to do it manually.
@kirelagin
Copy link
Collaborator Author

Great! Thanks for testing.

@kirelagin kirelagin merged commit f12fd1e into master Apr 9, 2021
@kirelagin kirelagin deleted the string-length branch April 9, 2021 12:22
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.

Long DKIM Keys (or other long TXT record) lead to syntax error in bind9
2 participants