aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2021-01-11 11:27:42 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2021-01-11 11:27:47 +0100
commit675af2a515f25d96a6e3bfd4f824334f21dd6376 (patch)
treeb804ae4ec0855b73f3e42a2b955c64ec86553f91 /src/net.h
parent616eace02acdc5f9ce775f6bf82fc8964980162f (diff)
parent39b43298d9c54f9c18bef36f3d5934f57aefd088 (diff)
downloadbitcoin-675af2a515f25d96a6e3bfd4f824334f21dd6376.tar.xz
Merge #20852: net: allow CSubNet of non-IP networks
39b43298d9c54f9c18bef36f3d5934f57aefd088 test: add test for banning of non-IP addresses (Vasil Dimov) 94d335da7f8232bc653c9b08b0a33b517b4c98ad net: allow CSubNet of non-IP networks (Vasil Dimov) Pull request description: Allow creation of valid `CSubNet` objects of non-IP networks and only match the single address they were created from (like /32 for IPv4 or /128 for IPv6). This fixes a deficiency in `CConnman::DisconnectNode(const CNetAddr& addr)` and in `BanMan` which assume that creating a subnet from any address using the `CSubNet(CNetAddr)` constructor would later match that address only. Before this change a non-IP subnet would be invalid and would not match any address. ACKs for top commit: jonatack: Code review re-ACK 39b43298d9c54f9c18bef36f3d5934f57aefd088 per `git diff 5e95ce6 39b4329`; only change since last review is improvements to the functional test; verified the test fails on master @ 616eace0 where expected (`assert(self.is_banned(node, tor_addr))` fails and unban unfails) laanwj: code review ACK 39b43298d9c54f9c18bef36f3d5934f57aefd088 Tree-SHA512: 3239b26d0f2fa2d1388b4fdbc1d05ce4ac1980be699c6ec46049409baefcb2006b1e72b889871e2210e897f6725c48e873f68457eea7e6e4958ab4f959d20297
Diffstat (limited to 'src/net.h')
0 files changed, 0 insertions, 0 deletions