-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.0.5, 4.1.1, 4.1.4
-
Component/s: Networking
-
None
-
ALL
-
When connecting to a domain via SRV record, each host in the SRV record is being checked to see if it is in the same domain as the SRV entry.
Thus, if we have a SRV record that returns 3 hosts:
_mongodb._tcp.example.org -> host1.domain.com, host2.domai.com, host3.otherdomain.com
Mongo components return an error similar to: "Domain suffix from SRV record not matched input domain" or "Hostname host1.domain.com. is not within the domain example.org".
Code that causes this is here: https://github.com/mongodb/mongo/blob/master/src/mongo/client/mongo_uri.cpp#L428-L432
https://github.com/mongodb/mongo-tools/blob/master/common/connstring/connstring.go#L468-L488