-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
None
Similar to CDRIVER-2789, I observed that CNAME records could be returned by res_nsearch. I discovered this by accident when testing SRV polling but forgetting to override my DNS. Connecting to this URI:
mongodb+srv://server.mongodb.com/?tls=true&tlsinsecure=true&heartbeatFrequencyMS=1000&directConnection=false
Will attempt to do SRV and TXT lookup on _mongodb._tcp.server.mongodb.com. This gave a strange error, looking like it was applying malformed text to the URI's options. When debugging it seems that the CNAME records returned were being applied as SRV / TXT records. Even querying with dig shows that CNAME records are returned when SRV / TXT is requested:
$ dig -t txt _mongodb._tcp.server.mongodb.com ... ;; ANSWER SECTION: _mongodb._tcp.server.mongodb.com. 3600 IN CNAME glb.mongodb.com. ...
This may be a misconfigured DNS server, but we should handle that gracefully. Let's apply the same fix of CDRIVER-2789 to the libresolv implementation of seedlist discovery and filter out non matching records.
- is related to
-
CDRIVER-2789 Occasional crash with mongodb+srv URI on Windows
- Closed