Commit 9f136f8a authored by valenting's avatar valenting
Browse files

Bug 1743995 - DNS cache can not get TTL from DNS-over-HTTPS r=necko-reviewers,kershaw

If mTTL is initialized to UINT32_MAX then the update condition when
adding a new IP via DOHResp::Add will never be triggered (a TTL can
never be larger than UINT32_MAX).
So it is better to have it be initialized to 0.

Differential Revision: https://phabricator.services.mozilla.com/D132697
parent e7b60715
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ class DOHresp {
  nsresult Add(uint32_t TTL, unsigned char const* dns, unsigned int index,
               uint16_t len, bool aLocalAllowed);
  nsTArray<NetAddr> mAddresses;
  uint32_t mTtl = UINT32_MAX;
  uint32_t mTtl = 0;
};

// the values map to RFC1035 type identifiers