The message code would convert negative TTL into 0, but the TTL could
never be negative, as it was read with the '!I' format, which reads
unsigned 32 bit integers. We don't want to change that, since OPT flags
(which are encoded in the TTL) should be treated as unsigned. Instead,
treat all TTLs > (2^31 - 1) as 0.
self.message.first)
self.message.had_tsig = True
else:
- if ttl < 0:
+ if ttl > 0x7fffffff:
ttl = 0
if self.updating and \
rdclass in (dns.rdataclass.ANY, dns.rdataclass.NONE):