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

Missing IPv6 addresses - only link local displayed #931

Open
tlstpierre opened this issue Aug 29, 2024 · 0 comments
Open

Missing IPv6 addresses - only link local displayed #931

tlstpierre opened this issue Aug 29, 2024 · 0 comments

Comments

@tlstpierre
Copy link

The networkInterfaces function shows IPv6 address information, but only the first IPv6 address, which seems to be link-local (the least useful address).

This function should return all IPv6 addresses as an array, or at the very least, return the first non-link-local address. The link-local address probably should be in a different field, or perhaps omitted, since you can calculate it from the MAC anyway.

To reproduce:

-Call the function and log the output on a computer with working IPv6
-Compare the output with the network configuration using ifconfig, ipaddr, or another mechanism to view your network config.
-Notice that only the link local (fe80) address is present, not the globally-unique addresses.

For example:
{
iface: 'en6',
ifaceName: 'en6',
default: true,
ip4: '172.17.16.146',
ip4subnet: '255.255.255.0',
ip6: 'fe80::e:379d:7f60:33a3',
ip6subnet: 'ffff:ffff:ffff:ffff::',
mac: 'a0:ce:c8:5f:7e:73',
internal: false,
virtual: false,
operstate: 'up',
type: 'wired',
duplex: 'full',
mtu: 1500,
speed: 1000,
dhcp: true,
dnsSuffix: '',
ieee8021xAuth: '',
ieee8021xState: '',
carrierChanges: 0
}

Compared with the below output (prefixes changed for privacy)
ifconfig en6
en6: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=6467<RXCSUM,TXCSUM,VLAN_MTU,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether a0:ce:c8:00:00:00
inet6 fe80::e:379d:7f60:33a3%en6 prefixlen 64 secured scopeid 0xa
inet 172.17.16.146 netmask 0xffffff00 broadcast 172.17.16.255
inet6 2001:db8:10:1:cda:cd4:b581:a96b prefixlen 64 autoconf secured
inet6 2001:db8:10:1:bd3f:a40f:e57:8d2c prefixlen 64 autoconf temporary
inet6 2001:db8:10:1::8893 prefixlen 64 dynamic
nat64 prefix 64:ff9b:: prefixlen 96
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (1000baseT )
status: active

Tested on Mac OS 12.7.6

Expected behaviour is that the function can return all IPv6 addresses, especially the non-link-local addresses. The 2001:db8: addresses (normally would be 2xxx:xxxx, but 2001:db8 is the IPv6 example prefix) are the ones the computer uses to communicate outside of the network, so knowing this is typically what one would want to find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant