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

v8.0.0 always returns *.*.*.0 instead of actual IP #48

Open
Tracked by #1344
lkmill opened this issue Jun 20, 2023 · 6 comments · May be fixed by #49
Open
Tracked by #1344

v8.0.0 always returns *.*.*.0 instead of actual IP #48

lkmill opened this issue Jun 20, 2023 · 6 comments · May be fixed by #49

Comments

@lkmill
Copy link

lkmill commented Jun 20, 2023

It seems calling normalize on

return normalize(cidr).split('/')[0];
converts eg 10.13.37.100/24 to 10.13.37.0/24. Thus, the actual IP of the computer will never be returned.

@sindresorhus
Copy link
Owner

// @silverwind

@iBicha
Copy link

iBicha commented Jun 23, 2023

Same, happens on mac
7.0.0 => http://192.168.1.182
8.0.0 => http://192.168.1.0

@adipascu
Copy link

adipascu commented Mar 4, 2024

v8.0.0 of this library has some regressions and points to the incorrect IP, I am sticking with v7 as well.

@grabbou
Copy link

grabbou commented Jul 18, 2024

I can confirm. Downgrading to v7 prints correct IP. On v8, I get *.*.0.0

@drweizak
Copy link

drweizak commented Aug 2, 2024

I also had to revert to version 7.x.x because last octet is always returning 0

@nneewwoo
Copy link

Same thing here. Had to downgrade to v7.

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

Successfully merging a pull request may close this issue.

7 participants