GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — net: fix address iteration with autoSelectFamily by indutny · Pull Request #48258 · nodejs/node

Conversation

@indutny

@indutny 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss and ShogunPanda reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@nodejs-github-bot

nodejs-github-bot commented May 30, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented May 30, 2023

Copy link
Copy Markdown
Member Author

cc @nodejs/net

(I'd appreciate a backport to 18)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot 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 juanarbol added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 31, 2023
@juanarbol

juanarbol commented May 31, 2023

Copy link
Copy Markdown
Member

I could try backporting to v18 when this lands.

indutny reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 31, 2023
@nodejs-github-bot

nodejs-github-bot commented May 31, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/52011/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda

ShogunPanda commented May 31, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ShogunPanda
ShogunPanda approved these changes May 31, 2023
View reviewed changes
ShogunPanda
ShogunPanda approved these changes May 31, 2023
View reviewed changes
@ShogunPanda

ShogunPanda commented May 31, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda ShogunPanda added the fast-track PRs proposed for a shorter-than-standard waiting period before landing. label May 31, 2023
@github-actions

github-actions Bot commented May 31, 2023

Copy link
Copy Markdown
Contributor

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

ShogunPanda, cjihrig, lpinca, and juanarbol reacted with thumbs up emoji
All reactions
  • 👍 4 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cjihrig
cjihrig approved these changes May 31, 2023
View reviewed changes
tniessen
tniessen approved these changes May 31, 2023
View reviewed changes

@tniessen tniessen left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ShogunPanda

ShogunPanda commented May 31, 2023

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny
net: fix address iteration with autoSelectFamily
71fe736
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
indutny force-pushed the fix/net-multi-connect branch from eb3f503 to 71fe736 Compare May 31, 2023 15:03
@indutny

indutny commented May 31, 2023

Copy link
Copy Markdown
Member Author

Good idea! @ShogunPanda would something like this suffice?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda

ShogunPanda commented May 31, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

@tniessen Are we good on merging this now?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tniessen

tniessen commented May 31, 2023

Copy link
Copy Markdown
Member

@ShogunPanda Modulo approvals and CI, sure :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca approved these changes May 31, 2023
View reviewed changes
@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 31, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 31, 2023
@nodejs-github-bot

nodejs-github-bot commented May 31, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/52027/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 31, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/52034/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

juanarbol
juanarbol approved these changes May 31, 2023
View reviewed changes
@juanarbol juanarbol added the commit-queue PRs queued for automated landing through the Commit Queue. label May 31, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 31, 2023
@juanarbol juanarbol added the backport-open-v18.x label May 31, 2023
@ShogunPanda ShogunPanda added commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. labels Jun 1, 2023
@ShogunPanda ShogunPanda mentioned this pull request Jun 1, 2023
test: fix tests failing only on node v20 nodejs/undici#2096
Merged
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jun 1, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 403a72f into nodejs:main Jun 1, 2023
@nodejs-github-bot

nodejs-github-bot commented Jun 1, 2023

Copy link
Copy Markdown
Collaborator

Landed in 403a72f

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jun 2, 2023
CI Reliability 2023-06-02 nodejs/reliability#583
Open
CI Reliability 2023-06-03 nodejs/reliability#584
Open
CI Reliability 2023-06-04 nodejs/reliability#585
Open
targos pushed a commit that referenced this pull request Jun 4, 2023
@indutny @targos
net: fix address iteration with autoSelectFamily
950185b
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
@targos targos mentioned this pull request Jun 4, 2023
v20.3.0 release proposal #48332
Merged
This was referenced Jun 5, 2023
CI Reliability 2023-06-05 nodejs/reliability#586
Open
CI Reliability 2023-06-06 nodejs/reliability#587
Open
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 17, 2023
@indutny @juanarbol
net: fix address iteration with autoSelectFamily
f0d848a
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
mhdawson pushed a commit to mhdawson/io.js that referenced this pull request Jul 26, 2023
@indutny @mhdawson
net: fix address iteration with autoSelectFamily
4af24bc
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
mhdawson pushed a commit to mhdawson/io.js that referenced this pull request Aug 4, 2023
@indutny @mhdawson
net: fix address iteration with autoSelectFamily
27a243f
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
@mhdawson mhdawson mentioned this pull request Aug 4, 2023
[v18.x] Backport 48969 to v18.x staging #49016
Closed
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@indutny @Ceres6
net: fix address iteration with autoSelectFamily
369b14c
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@indutny @Ceres6
net: fix address iteration with autoSelectFamily
52a7cab
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 14, 2023
@indutny @ruyadorno
net: fix address iteration with autoSelectFamily
d3637cd
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
@ruyadorno ruyadorno added backported-to-v18.x and removed backport-open-v18.x labels Aug 14, 2023
@ruyadorno ruyadorno mentioned this pull request Aug 17, 2023
v18.18.0 proposal #49220
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ShogunPanda ShogunPanda ShogunPanda approved these changes
@lpinca lpinca lpinca approved these changes
@cjihrig cjihrig cjihrig approved these changes
@tniessen tniessen tniessen approved these changes
@juanarbol juanarbol juanarbol approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

fast-track PRs proposed for a shorter-than-standard waiting period before landing. needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@indutny @nodejs-github-bot @juanarbol @ShogunPanda @tniessen @lpinca @cjihrig @ruyadorno
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.