Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Swapped private and public IP? #57

Closed
julianxhokaxhiu opened this issue May 5, 2016 · 5 comments
Closed

Swapped private and public IP? #57

julianxhokaxhiu opened this issue May 5, 2016 · 5 comments

Comments

@julianxhokaxhiu
Copy link

Hi,

I'm using your latest version of the package and I found a weirdo issue. Whenever I try to call the .address() API, I get swapped values. See the following snippet:

ip.address( 'private', 'ipv4' ) // 192.168.1.254
ip.address( 'public', 'ipv4' ) // 127.0.0.1

Why? Any help is really appreciated.

Thanks in advance!

@bryanwayb
Copy link
Collaborator

Hey @julianxhokaxhiu, good catch. Trouble was backwards logic on an array filter in lib/ip.js, line 388. That code has been like that for at least 3 years, surprised it wasn't caught sooner...

The latests commits have the fix.

@julianxhokaxhiu
Copy link
Author

Can you push / Did you push this to NPM?

@bryanwayb
Copy link
Collaborator

No, I haven't done a publish.

Hey @indutny, could you do a publish please? I've already incremented the version number.

@indutny
Copy link
Owner

indutny commented May 6, 2016

Done, sorry for delay!

@julianxhokaxhiu
Copy link
Author

Thank you!

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

No branches or pull requests

3 participants