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

Serial must not be zero #44

Closed
nguydavi opened this issue May 29, 2019 · 2 comments
Closed

Serial must not be zero #44

nguydavi opened this issue May 29, 2019 · 2 comments

Comments

@nguydavi
Copy link

Serial.increment() may return zero as seen here

But according to RFC1982 section 7 https://tools.ietf.org/html/rfc1982

Caution should also be exercised before causing the serial number to
be set to the value zero. While this value is not in any way special
in serial number arithmetic, or to the DNS SOA serial number, many
DNS implementations have incorrectly treated zero as a special case,
with special properties, and unusual behaviour may be expected if
zero is used as a DNS SOA serial number.

and RFC2136 section 4.2 & 7.11 https://tools.ietf.org/html/rfc2136

4.2. If update ordering is desired, the requestor will need to know
the value of the existing SOA RR. Requestors who update the SOA RR
must update the SOA SERIAL field in a positive direction (as defined
by [RFC1982]) and also preserve the other SOA fields unless the
requestor's explicit intent is to change them. The SOA SERIAL field
must never be set to zero (0).
...
7.11. A zone's SOA SERIAL should never be set to zero (0) due to
interoperability problems with some older but widely installed
implementations of DNS. When incrementing an SOA SERIAL, if the
result of the increment is zero (0) (as will be true when wrapping
around 2**32), it is necessary to increment it again or set it to one
(1). See [RFC1982] for more detail on this subject.

kingle pushed a commit to kingle/dnsjava that referenced this issue May 30, 2019
@kingle kingle self-assigned this May 30, 2019
kingle added a commit to kingle/dnsjava that referenced this issue May 30, 2019
@kingle kingle removed their assignment May 30, 2019
@kingle
Copy link
Contributor

kingle commented May 30, 2019

@nguydavi , what is your usage of the Serial class? We may want to deprecate Serial increment() method. See issue #46

@nguydavi
Copy link
Author

Main use case is for services that don't increment the SOA serial by default for you (I know for instance that AWS Route 53 doesn't do it for you). But that class could be used from a DNS service side as well.

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

2 participants