Skip to content

Different results with old a new version #58

@rols2015

Description

@rols2015

Hello, I upgraded from v1.0.6 to 2.00 and I got different results:

const localCIDR = new Netmask('10.10');
console.log(localCIDR);

With 2.0.0 output is

Netmask {
  bitmask: 32,
  maskLong: 4294967295,
  netLong: 167772170,
  size: 1,
  base: '10.0.0.10',
  mask: '255.255.255.255',
  hostmask: '0.0.0.0',
  first: '10.0.0.10',
  last: '10.0.0.10',
  broadcast: undefined
}

but with 1.0.6 I had

Netmask {
   bitmask: 16,
     maskLong: 4294901760,
     netLong: 168427520,
     size: 65536,
     base: '10.10.0.0',
     mask: '255.255.0.0',
     hostmask: '0.0.255.255',
     first: '10.10.0.1',
     last: '10.10.255.254',
     broadcast: '10.10.255.255'
 }

I get the same result only if I provide the full adresse

const localCIDR = new Netmask('10.10.0.0/16');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions