Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: allow wider regex in interface name #34364

Closed
wants to merge 1 commit into from
Closed

Conversation

sxa
Copy link
Member

@sxa sxa commented Jul 14, 2020

This is a fix for the issue that is stopping #14500 from being merged due to zone IDs on Linux being network interface names, and the regex for zone ID does not pass the check in net.isIP if it contains non-alphanumeric characters.

We should possibly look at a wider expansion of the characters that can be used as zone IDs but this will trap the more likely ones for now, and allow 14500 to go in - we can create an issue to extend it to a more complete list if desired. dns label added as this may have shown up as part of a lookup call during the new test in the referenced PR.

Cc @bnoordhuis, @indutny, @nodejs/streams @Trott @lpinca

Signed-off-by: Stewart Addison sxa@uk.ibm.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@sxa sxa added dns Issues and PRs related to the dns subsystem. net Issues and PRs related to the net subsystem. labels Jul 14, 2020
@sxa sxa self-assigned this Jul 14, 2020
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

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

Subsystem could be net over the generic lib (I'm fine either way).

Zone IDs on Linux are network interface names. The regex we use to
determine valid IPs does not allow for non-alphanumeric characters
in the zone ID suffix. Some machines (including the RHEL Linux/s390x
machines from Marist) have zone IDs with a '.' character in them
which the regex in net.isIP rejects. This changes the regex.

Ref: nodejs#14500

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>
@sxa
Copy link
Member Author

sxa commented Jul 14, 2020

Subsystem could be net over the generic lib (I'm fine either way).

Fair comment - changed

@sxa sxa changed the title lib: allow wider regex in interface name net: allow wider regex in interface name Jul 14, 2020
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@sxa sxa added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 15, 2020
mhdawson pushed a commit that referenced this pull request Jul 16, 2020
Zone IDs on Linux are network interface names. The regex we use to
determine valid IPs does not allow for non-alphanumeric characters
in the zone ID suffix. Some machines (including the RHEL Linux/s390x
machines from Marist) have zone IDs with a '.' character in them
which the regex in net.isIP rejects. This changes the regex.

Ref: #14500

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

PR-URL: #34364
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@mhdawson
Copy link
Member

CI green, landed as 9cb7293

@mhdawson mhdawson closed this Jul 16, 2020
cjihrig pushed a commit that referenced this pull request Jul 23, 2020
Zone IDs on Linux are network interface names. The regex we use to
determine valid IPs does not allow for non-alphanumeric characters
in the zone ID suffix. Some machines (including the RHEL Linux/s390x
machines from Marist) have zone IDs with a '.' character in them
which the regex in net.isIP rejects. This changes the regex.

Ref: #14500

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

PR-URL: #34364
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
MylesBorins pushed a commit that referenced this pull request Jul 27, 2020
Zone IDs on Linux are network interface names. The regex we use to
determine valid IPs does not allow for non-alphanumeric characters
in the zone ID suffix. Some machines (including the RHEL Linux/s390x
machines from Marist) have zone IDs with a '.' character in them
which the regex in net.isIP rejects. This changes the regex.

Ref: #14500

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

PR-URL: #34364
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@ruyadorno ruyadorno mentioned this pull request Jul 28, 2020
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Zone IDs on Linux are network interface names. The regex we use to
determine valid IPs does not allow for non-alphanumeric characters
in the zone ID suffix. Some machines (including the RHEL Linux/s390x
machines from Marist) have zone IDs with a '.' character in them
which the regex in net.isIP rejects. This changes the regex.

Ref: #14500

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

PR-URL: #34364
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Zone IDs on Linux are network interface names. The regex we use to
determine valid IPs does not allow for non-alphanumeric characters
in the zone ID suffix. Some machines (including the RHEL Linux/s390x
machines from Marist) have zone IDs with a '.' character in them
which the regex in net.isIP rejects. This changes the regex.

Ref: #14500

Signed-off-by: Stewart Addison <sxa@uk.ibm.com>

PR-URL: #34364
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@codebytere codebytere mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. dns Issues and PRs related to the dns subsystem. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants