Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

fix(connection): default family to undefined rather than 4 #230

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

vkarpov15
Copy link
Member

Upon closer inspection, #183 was actually very much backwards breaking and should not have been merged. This issue causes Automattic/mongoose#5760 via Automattic/mongoose@93e771c .

The problem with #183 is that net.createConnection() calls dns.lookup() with the family option always set. If the family option is not set, dns.lookup() will return both ipv4 and ipv6 addresses, but since mongodb-core always sets family now, the driver can only connect to ipv4 or ipv6 depending on the value of family. In particular, this means that any user that was connecting to an ipv6 address now must specify family: 6 in porcelain layer >= 2.2.28 and mongoose >= 4.11.6 in order to successfully connect, whereas they didn't have to before.

@mbroadst
Copy link
Member

@jlord this is needs to be ported to 3.x as well please

jlord pushed a commit that referenced this pull request Nov 20, 2017
jlord pushed a commit that referenced this pull request Nov 21, 2017
mbroadst pushed a commit that referenced this pull request Nov 21, 2017
* fix(connection): default `family` to undefined rather than 4

ported from #230

* chore(package lock): remove package lock

* fix(connection): typo
@jlord jlord merged commit 9b35583 into 2.0 Nov 27, 2017
@jlord jlord deleted the vkarpov15-patch-1 branch November 27, 2017 15:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants