FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

net: fix address iteration with autoSelectFamily by indutny · Pull Request #48258 · nodejs/node · GitHub

/ node Public

net: fix address iteration with autoSelectFamily - #48258

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
indutny:fix/net-multi-connect
Jun 1, 2023
Merged

net: fix address iteration with autoSelectFamily#48258
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
indutny:fix/net-multi-connect

Conversation

indutny commented May 30, 2023

Copy link
Copy Markdown
Member

When autoSelectFamily is set to true, net.connect is supposed to try connecting to both IPv4 and IPv6, interleaving the address types. Instead, it appears that the array that holds the addresses in the order they should be attempted was never used after being populated.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

indutny commented May 30, 2023

Copy link
Copy Markdown
Member Author

cc @nodejs/net

(I'd appreciate a backport to 18)

nodejs-github-bot added needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels May 30, 2023
juanarbol added the request-ci Add this label to start a Jenkins CI on a PR. label May 31, 2023

Copy link
Copy Markdown
Member

I could try backporting to v18 when this lands.

github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 31, 2023

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Contributor

OMG!
Nice spot, thanks for finding it. You are absolutely right!

Copy link
Copy Markdown
Contributor

I'm gonna ask to fast track this, it might be also be used in #48189.

ShogunPanda added the fast-track PRs that do not need to wait for 48 hours to land. label May 31, 2023

Copy link
Copy Markdown
Contributor

Fast-track has been requested by @ShogunPanda. Please 👍 to approve.

tniessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Woah, that, along with #48145, is a significant deviation from the RFC, and yet it's enabled by default. Is there any way to add a test for this to avoid this in the future?

Copy link
Copy Markdown
Contributor

@tniessen Yes, we can simulate bunch of addresses returned in order (like A, A, A, A, AAAA, AAAA, AAAA) and then we can verify we test them alternatively.

@indutny Can you please write such a test?

When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.
indutny force-pushed the fix/net-multi-connect branch from eb3f503 to 71fe736 Compare May 31, 2023 15:03

indutny commented May 31, 2023

Copy link
Copy Markdown
Member Author

Good idea! @ShogunPanda would something like this suffice?

ShogunPanda commented May 31, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Yes, that's exactly what I was thinking about, thanks!

@tniessen Are we good on merging this now?

Copy link
Copy Markdown
Member

@ShogunPanda Modulo approvals and CI, sure :)

lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label May 31, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 31, 2023

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

juanarbol added the commit-queue Add this label to land a pull request using GitHub Actions. label May 31, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 31, 2023
ShogunPanda added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jun 1, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 1, 2023
nodejs-github-bot merged commit 403a72f into nodejs:main Jun 1, 2023

Copy link
Copy Markdown
Collaborator

Landed in 403a72f

targos pushed a commit that referenced this pull request Jun 4, 2023
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: #48258
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
targos mentioned this pull request Jun 4, 2023
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 17, 2023
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: nodejs#48258
Backport-PR-URL: nodejs#48275
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
mhdawson pushed a commit to mhdawson/io.js that referenced this pull request Jul 26, 2023
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: nodejs#48258
Backport-PR-URL: nodejs#48275
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
mhdawson pushed a commit to mhdawson/io.js that referenced this pull request Aug 4, 2023
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: nodejs#48258
Backport-PR-URL: nodejs#48275
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: nodejs#48258
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: nodejs#48258
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
ruyadorno pushed a commit that referenced this pull request Aug 14, 2023
When `autoSelectFamily` is set to `true`, `net.connect` is supposed to
try connecting to both IPv4 and IPv6, interleaving the address types.
Instead, it appears that the array that holds the addresses in the order
they should be attempted was never used after being populated.

PR-URL: #48258
Backport-PR-URL: #49016
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
ruyadorno mentioned this pull request Aug 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track PRs that do not need to wait for 48 hours to land. needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL