Uh oh!
There was an error while loading. Please reload this page.
test/dgram: Add support for IPv6 link local scope IDs in received UDP datagrams - #14500
test/dgram: Add support for IPv6 link local scope IDs in received UDP datagrams#14500pekkanikander wants to merge 1 commit into
Conversation
f53d11e to
842bd12Compare47e6c7b to
f0e506cComparef0e506c to
79392acCompareChanges to libuv need to go upstream first. Also FWIW, Windows support seems to be missing. |
pekkanikander
commented
Jul 26, 2017
Any chance of getting any help with Windows? I haven't used Windows since 2001 or so. |
mscdex
commented
Jul 26, 2017
@pekkanikander You might ask when posting your issue/PR on the libuv repo. |
bzoz
commented
Aug 16, 2017
@pekkanikander as you found in the libuv/libuv#1445, Windows uses interface numbers as scope id. This makes Windows change in // Add an interface identifier to a link local addressif (IN6_IS_ADDR_LINKLOCAL(&a6->sin6_addr)) {
sprintf(ip+strlen(ip), "%%%d", a6->sin6_scope_id);
}With this and following change to the // Map the interface into its address, with interface ID.map((iface)=>iface.address+'%'+iface.scopeid)the test passes on Windows. |
jasnell
commented
Aug 24, 2017
Marking this a being blocked on libuv |
uv_if_indextoname() is used to convert an IPv6 scope_id to an interface identifier string such as %eth0 or %lo. uv_if_indextoiid() returns an IPv6 interface identifier. On Unix it calls uv_if_indextoname(). On Windows it uses snprintf() to return the numeric interface identifier as a string. Refs: nodejs/node#14500 PR-URL: #1445 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
79392ac to
2ccca4cComparepekkanikander
commented
Nov 8, 2017
Manually updated, with the the required changes from upstream libuv 1.16.0. |
cjihrig
commented
Nov 10, 2017
@pekkanikander please remove the libuv commit and rebase this PR. libuv 1.16.1 is now on master. |
2ccca4c to
de58e96Comparepekkanikander
commented
Nov 10, 2017
Updated. |
pekkanikander
commented
Nov 13, 2017
@bnoordhuis Ben, any idea when you will have time to review this PR? I have some time to handle review comments this week, but next week not. Next week I will be travelling with a quite busy schedule. |
lpinca
commented
Jul 14, 2020
@sxa yes it makes sense. I think that fix should go in a separate PR. Feel free to open it. We can then rebase this on top of it. |
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>
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>
nodejs-github-bot
commented
Jul 20, 2020
The new test passes on LinuxOne after #34364 landed. @Trott do you still have a concern over this given that node-test-commit-windows-fanned looks ok? Everything finally looks green here - maybe we'll get this in before the three year mark :-D |
Trott
commented
Jul 21, 2020
Yes. It's very suspicious that no tests have failed. I'm concerned. No, just kidding, OMG, yes, let's land this thing. |
lpinca
commented
Jul 21, 2020
Do it! |
Add IPv6 link local scope ID suffix to the rinfo address in those received upd6 datagrams whose source address is a link local address. Add a new test case, test-dgram-udp6-link-local-address, to verify that IPv6 UDP datagrams received from a link-local source address do contain the scope ID suffix in the rinfo address field. When a packet is received from a link-local source address, if the address does not contain the scope ID suffix, it is impossible to reply back to the sender, as the kernel is not able to determine the right network interface to send the packet through and returns with an error. Ref: #1649 PR-URL: #14500 Refs: #1649 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Stewart X Addison <sxa@uk.ibm.com>
sxa
commented
Jul 21, 2020
Landed in bdf6827 - thanks everyone - we got this PR in five days before it got to it's third birthday 😅 🍾 |
pekkanikander
commented
Jul 21, 2020
A big thank you 🙏🙏 for your perseverance and efforts on getting this humble fix finally landed! |
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>
Add IPv6 link local scope ID suffix to the rinfo address in those received upd6 datagrams whose source address is a link local address. Add a new test case, test-dgram-udp6-link-local-address, to verify that IPv6 UDP datagrams received from a link-local source address do contain the scope ID suffix in the rinfo address field. When a packet is received from a link-local source address, if the address does not contain the scope ID suffix, it is impossible to reply back to the sender, as the kernel is not able to determine the right network interface to send the packet through and returns with an error. Ref: #1649 PR-URL: #14500 Refs: #1649 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Stewart X Addison <sxa@uk.ibm.com>
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>
Add IPv6 link local scope ID suffix to the rinfo address in those received upd6 datagrams whose source address is a link local address. Add a new test case, test-dgram-udp6-link-local-address, to verify that IPv6 UDP datagrams received from a link-local source address do contain the scope ID suffix in the rinfo address field. When a packet is received from a link-local source address, if the address does not contain the scope ID suffix, it is impossible to reply back to the sender, as the kernel is not able to determine the right network interface to send the packet through and returns with an error. Ref: #1649 PR-URL: #14500 Refs: #1649 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Stewart X Addison <sxa@uk.ibm.com>
Notable changes: dgram: * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500 doc: * add AshCripps to collaborators (AshCripps) #34494 * add HarshithaKP to collaborators (Harshitha K P) #34417 * add rexagod to collaborators (Pranshu Srivastava) #34457 * add release key for Richard Lau (Richard Lau) #34397 events: * (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057 src: * (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387 * (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584 worker: * (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057 PR-URL: TODO
This has been a joy to follow. Good job people. 👍 |
A new test case to verify that IPv6 UDP datagrams
received from a link-local source address do contain
the scope ID suffix in the rinfo address field.
Add IPv6 link local scope ID suffix to the
rinfo address in those received upd6 datagrams
whose source address is a link local address.
When a packet is received from a link-local source
address, if the address does not contain the scope
ID suffix, it is impossible to reply back to the
sender, as the kernel is not able to determine
the right network interface to send the packet
through and returns with an error.
Ref: #1649
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test, dgram