Files
bitcoin/src
Jon Atack f2a88986a1 p2p, bugfix: use NetPermissions::HasFlag() in CConnman::Bind()
PF_NOBAN is a multi-flag that includes PF_DOWNLOAD, so the conditional
in CConnman::Bind() using a bitwise AND will return the same result
for both the "noban" status and the "download" status.

Example:

`PF_DOWNLOAD` is `0b1000000`
`PF_NOBAN`    is `0b1010000`

This makes a check like `flags & PF_NOBAN` return `true` even if `flags`
is equal to `PF_DOWNLOAD`.

If `-whitebind=download@1.1.1.1:8765` is specified, then `1.1.1.1:8765`
should be added to the list of local addresses. We only want to avoid
adding to local addresses (that are advertised) a whitebind that has a
`noban@` flag.

As a result of a mis-check in `CConnman::Bind()` we would not have added
`1.1.1.1:8765` to the local addresses in the example above.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>

Github-Pull: bitcoin/bitcoin#21644
Rebased-From: dde69f20a0
2021-05-22 09:58:26 +02:00
..
2020-10-12 12:14:53 -07:00
2021-04-16 13:21:07 +02:00
2020-02-09 07:44:29 -08:00
2021-02-11 12:42:40 +01:00
2020-10-09 14:29:04 +03:00
2020-10-09 14:29:04 +03:00
2021-03-27 12:09:48 -07:00
2021-03-27 12:09:48 -07:00
2020-08-27 20:07:27 -04:00
2020-07-01 14:44:28 -04:00
2020-07-01 14:44:28 -04:00
2020-07-08 14:26:14 +03:00
2019-02-22 17:38:45 -08:00
2020-10-12 02:06:32 -07:00
2020-10-12 02:06:32 -07:00
2020-10-14 11:18:12 -04:00
2020-10-14 11:18:12 -04:00
2020-07-01 18:03:12 -04:00
2020-04-30 09:19:14 -04:00
2020-06-21 06:02:59 -04:00
2020-06-21 06:02:59 -04:00
2020-09-19 18:02:42 +03:00
2020-07-01 14:44:24 -04:00
2020-10-12 12:14:53 -07:00
2020-10-12 11:01:16 -07:00
2020-10-12 11:01:16 -07:00
2020-04-16 13:33:09 -04:00