revert #20852 net: allow CSubNet of non-IP networks #20926

pull vasild wants to merge 2 commits into bitcoin:master from vasild:revert_20852 changing 4 files +19 −123
  1. vasild commented at 2:51 PM on January 13, 2021: member

    The problem with #20852 is that if a host is banned that cannot be serialized in addrv1 format (e.g. Torv3) it is serialized as a dummy IPv6 (::) in banlist.dat. So, upon restart, the ban entry is lost (is deserialized as an invalid subnet that matches nothing).

  2. revert 39b432 net: allow CSubNet of non-IP networks
    The problem with #20852 is that if a host is banned that cannot be
    serialized in addrv1 format (e.g. Torv3) it is serialized as a dummy
    IPv6 (`::`) in `banlist.dat`. So, upon restart, the ban entry is
    lost (is deserialized as an invalid subnet that matches nothing).
    
    This reverts commit 39b43298d9c54f9c18bef36f3d5934f57aefd088
    from https://github.com/bitcoin/bitcoin/pull/20852.
    07aefe77ea
  3. revert 94d335 net: allow CSubNet of non-IP networks
    The problem with #20852 is that if a host is banned that cannot be
    serialized in addrv1 format (e.g. Torv3) it is serialized as a dummy
    IPv6 (`::`) in `banlist.dat`. So, upon restart, the ban entry is
    lost (is deserialized as an invalid subnet that matches nothing).
    
    This reverts commit 94d335da7f8232bc653c9b08b0a33b517b4c98ad
    from https://github.com/bitcoin/bitcoin/pull/20852.
    e61023506e
  4. fanquake added the label P2P on Jan 13, 2021
  5. MarcoFalke commented at 2:56 PM on January 13, 2021: member

    Why? Reverting the pull won't fix any issue. I presume the ban will either silently or verbosely fail, which seems worse than current master.

  6. vasild commented at 2:59 PM on January 13, 2021: member

    #20852 also aimed to fix a problem with CConnman::DisconnectNode() not disconnecting non-IP hosts - this fix is proper. Banning a Torv2 also works properly through restart (Torv2 addresses can be serialized in addrv1 format in 16 bytes).

    However banning a Torv3 host and saving it to banlist.dat requires a file format change.

  7. MarcoFalke commented at 3:13 PM on January 13, 2021: member

    However banning a Torv3 host and saving it to banlist.dat requires a file format change.

    If you are worried that someone is running master and doesn't see the silent fail (reading the banlist file), you can turn it into a verbose fail. Though I'd rather prefer to spend the resources on fixing the file format, so that we have something to backport to 0.21.1 hopefully.

  8. vasild commented at 3:16 PM on January 13, 2021: member
  9. vasild closed this on Jan 13, 2021

  10. vasild deleted the branch on Jan 13, 2021
  11. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-25 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me