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

ip address format inconsistency #42922

Closed
webarchymeta opened this issue Apr 29, 2022 · 1 comment
Closed

ip address format inconsistency #42922

webarchymeta opened this issue Apr 29, 2022 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@webarchymeta
Copy link

Version

18.0.0

Platform

debian 11

Subsystem

No response

What steps will reproduce the bug?

const interfaces = os.networkInterfaces();

How often does it reproduce? Is there a required condition?

every time, under any known condition

What is the expected behavior?

for example

{
  lo: [
    {
      address: '127.0.0.1',
      netmask: '255.0.0.0',
      family: 'IPv4',
      mac: '00:00:00:00:00:00',
      internal: true,
      cidr: '127.0.0.1/8'
    },
    {
      address: '::1',
      netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
      family: 'IPv6',
      mac: '00:00:00:00:00:00',
      scopeid: 0,
      internal: true,
      cidr: '::1/128'
    }
  ],
  eth0: [
    {
      address: '192.168.1.108',
      netmask: '255.255.255.0',
      family: 'IPv4',
      mac: '01:02:03:0a:0b:0c',
      internal: false,
      cidr: '192.168.1.108/24'
    },
    {
      address: 'fe80::a00:27ff:fe4e:66a1',
      netmask: 'ffff:ffff:ffff:ffff::',
      family: 'IPv6',
      mac: '01:02:03:0a:0b:0c',
      scopeid: 1,
      internal: false,
      cidr: 'fe80::a00:27ff:fe4e:66a1/64'
    }
  ]
}

What do you see instead?

the output family value are all integers (4 or 6). This is not a consistent behavior expected and is not documented ...

Additional information

No response

@mscdex
Copy link
Contributor

mscdex commented Apr 29, 2022

Duplicate of #42861.

@mscdex mscdex closed this as completed Apr 29, 2022
@mscdex mscdex added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

2 participants