Skip to content

Releases: c-robinson/iplib

2.0.5

06 Apr 16:54
99f950a
Compare
Choose a tag to compare

v2.0.4...v2.0.5

2.0.4

19 Jan 06:00
Compare
Choose a tag to compare

v2.0.3...v2.0.4

  • Fix an overflow in Net6.Enumerate() on 32bit architectures
  • AllNetsBetween now starts with a netmask of 0 instead of 1, so iplib.AllNetsBetween(0.0.0.0, 255.255.255.255) will now return a single /0 network instead of two /1's.

2.0.3

06 Jan 23:39
Compare
Choose a tag to compare

v2.0.2...v2.0.3

  • New AllNetworksBetween() function generates a []iplib.Net of all the networks required to span two IP addresses inclusively
  • Fix the behavior of NewNetBetween() to always consider the final address when generating a netblock Previously it would sometimes exclude this address when it should not have
  • Update the godoc for NewNetBetween() to reflect reality. Previously the docs indicated that the generated network would be exclusive of both the start and end addresses which was just wrong and kind of dumb
  • Fix regression where Net6.Count() reported zero addresses for ::/0 instead of whatever the actual gimungous number is, which was introduced during the cutover to Uint128

2.0.2

30 Dec 22:47
808dd52
Compare
Choose a tag to compare

v2.0.1...v2.0.2

  • it is not obvious how go.mod should work for submodules, so this is another attempt to get them working correctly
  • fix for small issues golangci-lint uncovered
  • appease an angry race detector for Net6.Enumerate() on linux (but not macos 😬) by creating local variables inside goroutines
  • improve tests and add benchmarks for Net4.Enumerate() and Net6.Enumerate()

Also some repo cleanup

  • abandon circleci and coveralls in favor of actions workflows against all explicitly supported versions of go, running against MacOS, Linux and Windows

2.0.1

27 Dec 07:01
Compare
Choose a tag to compare

v2.0.0...v2.0.1

  • quick fix to update go get invocation, example imports and documentation references to v2 in the README for iplib, iid and iana

2.0.0

27 Dec 06:37
Compare
Choose a tag to compare

v1.0.8...v2.0.0

This release introduces a breaking change for IPv6 functions that take or return an integer value, including the Hostmask and Net6 structs and methods. Previously these functions relied upon *big.Int to hold the v6 address space, but this has been replaced by lukechampine.com/uint128. The performance improvement for the affected functions is so significant (from 5x faster for the increment/decrement functions to a whopping 25x faster for DeltaIP6()) that it easily justifies the incompatibility. IPv4 functions are unaffected by this change.

It has always been a goal for this library to not rely on dependencies outside of the Go standard library and hopefully some future v3 of this library could employ an internal uint128 type but that would require the adoption of this proposal or something similar.

TLDR:

  • all functions requiring or returning *big.Int have been rewritten to take uint128.Uint128 instead
  • new conversion functions have been created to move between IPv6 and uint128.Uint128 (the *big.Int converters still remain)
  • Net6 and Hostmask now also take and use uint128.Uint128
  • benchmarks, tests, examples and documentation have all been updated to reflect the change
  • the top of the README temporarily calls the change out for added visibility
  • added functions to convert ARPA DNS entries back to net.IP because, weirdly, I need to do this

1.0.8

24 Dec 20:09
Compare
Choose a tag to compare

v1.0.7...v1.0.8

  • Fix a problem where DecrementIP6WithinHostmask could panic if the hostmask had an underflow
  • Added a benchmark for subnetting IPv6

1.0.7

26 Aug 17:36
83b1af8
Compare
Choose a tag to compare

v1.0.6...v1.0.7

  • fix index out of bounds in IP4ToARPA function when IP address is nil

1.0.6

02 Jan 07:30
Compare
Choose a tag to compare

v1.0.5...v1.0.6

  • exported previously internal function CopyIP() which will create a copy of an IP address
  • Net4 and Net6 now have RandomIP() functions that will return a random address within the given netblock. They both use crypto/rand because that package works gracefully with *big.Int

1.0.5

31 Dec 18:59
de5f50e
Compare
Choose a tag to compare

v1.0.4...v1.0.5

  • fix IPv4 NextNext returning the wrong value if the supplied netmask is lower than the current one, by @luisdavim