ip.cidrSubnet() returns IPv4 addresses when IPv6 addresses are provided.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
The `cidrSubnet()` method returns IPv4 addresses for the `{network,first,last,broadcast}Address` when IPv6 addresses are provided:
> ip.cidrSubnet('2404:6800:4007:805::200e/56')
{ networkAddress: '0.0.9.100',
firstAddress: '0.0.9.100',
lastAddress: '0.0.9.99',
broadcastAddress: '0.0.9.99',
subnetMask: 'ffff:ffff:ffff:ff00::',
subnetMaskLength: 56,
numHosts: 5.960464477539063e-8,
length: 5.960464477539063e-8,
contains: [Function] }
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the cidrSubnet() method and reproduce the IPv6 example from the issue. Trace how its network, first, last, and broadcast addresses are calculated, then verify that those fields remain valid IPv6 addresses while the subnet mask and host values remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100