diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-05-26 08:59:20 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-05-26 08:59:59 +0200 |
| commit | b45c50ce511dbf541ea086ae40a3ad16ff06de0c (patch) | |
| tree | 8164631756d441bb812db9ff0f84022c197f4fa4 /src/rest.cpp | |
| parent | Simplify code for CSubnet (diff) | |
| download | discoin-b45c50ce511dbf541ea086ae40a3ad16ff06de0c.tar.xz discoin-b45c50ce511dbf541ea086ae40a3ad16ff06de0c.zip | |
Fix two problems in CSubNet parsing
Fix two CSubNet constructor problems:
- The use of `/x` where 8 does not divide x was broken, due to a
bit-order issue
- The use of e.g. `1.2.3.4/24` where the netmasked bits in the network
are not 0 was broken. Fix this by explicitly normalizing the netwok
according to the bitmask.
Also add tests for these cases.
Fixes #6179. Thanks to @jonasschnelli for reporting and initial fix.
Diffstat (limited to 'src/rest.cpp')
0 files changed, 0 insertions, 0 deletions