diff options
| author | Vasil Dimov <[email protected]> | 2020-08-24 21:03:31 +0200 |
|---|---|---|
| committer | Vasil Dimov <[email protected]> | 2020-08-24 21:50:59 +0200 |
| commit | 1ea57ad67406b3aaaef5254bc2fa7e4134f3a6df (patch) | |
| tree | 6c79a8f12caca034006db2e2320ce2339411ff0c /src/net_processing.cpp | |
| parent | Merge #19674: refactor: test: use throwaway _ variable for unused loop counters (diff) | |
| download | discoin-1ea57ad67406b3aaaef5254bc2fa7e4134f3a6df.tar.xz discoin-1ea57ad67406b3aaaef5254bc2fa7e4134f3a6df.zip | |
net: don't accept non-left-contiguous netmasks
A netmask that contains 1-bits after 0-bits (the 1-bits are not
contiguous on the left side) is invalid [1] [2].
The code before this PR used to parse and accept such
non-left-contiguous netmasks. However, a coming change that will alter
`CNetAddr::ip` to have flexible size would make juggling with such
netmasks more difficult, thus drop support for those.
[1] https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#Subnet_masks
[2] https://tools.ietf.org/html/rfc4632#section-5.1
Diffstat (limited to 'src/net_processing.cpp')
0 files changed, 0 insertions, 0 deletions