diff options
author | Pekka Nikander <pekka.nikander@iki.fi> | 2017-07-26 14:49:21 +0300 |
---|---|---|
committer | Stewart Addison <sxa@uk.ibm.com> | 2020-07-21 13:59:50 +0300 |
commit | bdf6827edcaea80dee719cd70647d983a3438b6d (patch) | |
tree | d6cec2ca3b42d601f06a7a684d724929d48cfcc0 /doc/api/dgram.md | |
parent | 2c05beeb54cef998fc11933936e18094ec3c540f (diff) |
dgram: add IPv6 scope id suffix to received udp6 dgrams
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: https://github.com/nodejs/node/issues/1649
PR-URL: https://github.com/nodejs/node/pull/14500
Refs: https://github.com/nodejs/node/issues/1649
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stewart X Addison <sxa@uk.ibm.com>
Diffstat (limited to 'doc/api/dgram.md')
-rw-r--r-- | doc/api/dgram.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/dgram.md b/doc/api/dgram.md index be0323a306b..3cc2ea78297 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -96,6 +96,12 @@ The event handler function is passed two arguments: `msg` and `rinfo`. * `port` {number} The sender port. * `size` {number} The message size. +If the source address of the incoming packet is an IPv6 link local +address, the interface name is added to the `address`. For +example, a packet received on the `en0` interface might have the +address field set to `'fe80::2618:1234:ab11:3b9c%en0'`, where `'%en0'` +is the interface name as a zone id suffix. + ### `socket.addMembership(multicastAddress[, multicastInterface])` <!-- YAML added: v0.6.9 |