-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
/32 subnet mask erroneously matches all IP addresses #43360
Labels
confirmed-bug
Issues with confirmed bugs.
good first issue
Issues that are suitable for first-time contributors.
Comments
@nodejs/net |
mcollina
added
confirmed-bug
Issues with confirmed bugs.
good first issue
Issues that are suitable for first-time contributors.
labels
Jun 9, 2022
@supriyo-biswas would you like to send a PR to address this? |
@mcollina yes, I will. If I have questions, is it fine to ask in this issue itself? |
@supriyo-biswas Yes, go for it! ^^ |
supriyo-biswas
added a commit
to supriyo-biswas/node
that referenced
this issue
Jun 11, 2022
supriyo-biswas
added a commit
to supriyo-biswas/node
that referenced
this issue
Jun 11, 2022
supriyo-biswas
added a commit
to supriyo-biswas/node
that referenced
this issue
Jun 11, 2022
supriyo-biswas
added a commit
to supriyo-biswas/node
that referenced
this issue
Jun 11, 2022
supriyo-biswas
added a commit
to supriyo-biswas/node
that referenced
this issue
Jun 11, 2022
supriyo-biswas
added a commit
to supriyo-biswas/node
that referenced
this issue
Jun 11, 2022
supriyo-biswas
added a commit
to supriyo-biswas/node
that referenced
this issue
Jun 15, 2022
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
nodejs-github-bot
pushed a commit
that referenced
this issue
Jun 25, 2022
Fixes: #43360 PR-URL: #43381 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
targos
pushed a commit
that referenced
this issue
Jul 12, 2022
Fixes: #43360 PR-URL: #43381 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
targos
pushed a commit
that referenced
this issue
Jul 20, 2022
Fixes: #43360 PR-URL: #43381 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
targos
pushed a commit
that referenced
this issue
Jul 31, 2022
Fixes: #43360 PR-URL: #43381 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
guangwong
pushed a commit
to noslate-project/node
that referenced
this issue
Oct 10, 2022
Fixes: nodejs/node#43360 PR-URL: nodejs/node#43381 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
confirmed-bug
Issues with confirmed bugs.
good first issue
Issues that are suitable for first-time contributors.
Version
v18.3.0
Platform
Darwin xxx 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
Subsystem
net
What steps will reproduce the bug?
A /32 subnet mask such as
1.1.1.1/32
should match only the IP address1.1.1.1
as all 32 bits should be compared. However, if a /32 subnet mask is used withnet.Blocklist()
, it erroneously matches all IP addresses.The issue can be reproduced by running the following code snippet:
Even though only
1.1.1.1
should match,true
is printed for all the IPs:If the subnet mask is changed to < 32, Node behaves correctly.
How often does it reproduce? Is there a required condition?
The bug can always be reproduced.
What is the expected behavior?
See above.
What do you see instead?
See above.
Additional information
This bug is present across other versions of Node too, for example see https://www.mycompiler.io/view/1JuZ56bnWhl where the Node version is Node 16.15.0.
The text was updated successfully, but these errors were encountered: