indutny / indutny/node-ip

Getting wrong IP address on Mac OS X 10.10.1

Open
#23 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.5k
Forks
228
PR merge metrics
No merged PRs in 30d

Description

When I call ip.address() on Mac OS X 10.10.1 I am getting 127.94.0.1 which is device 'lo0'. The IP address of the machine is 192.168.\* on device 'en0'. Am I mistaken in assuming it should be returning the local network IP? That's what I need to get.

FWIW I ran it on Linux and it is returning the 'eth0' device's address properly. So the bug appears to be Mac OS X 10.10.1 specific.

I am using ip 0.3.2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing ip.address() on Mac OS X 10.10.1 with ip 0.3.2, then inspect the implementation and its interface-selection behavior. Compare the lo0 and en0 results with the Linux behavior; done means the reported address matches the issue's intended local-network expectation, with a regression test if the existing test setup supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.