Commit b92b12e
committed
Merge bitcoin#25735: net: remove useless call to IsReachable() from CConnman::Bind()
9cbfe40 net: remove useless call to IsReachable() from CConnman::Bind() (Vasil Dimov)
Pull request description:
`CConnman::Bind()` is called without `BF_EXPLICIT` only when passed
either `0.0.0.0` or `::`. For those addresses `IsReachable()` is always
true (regardless of the `-onlynet=` setting!), meaning that the `if`
condition never evaluates to true.
`IsReachable()` is always true for the "any" IPv4 and IPv6 addresses
because `CNetAddr::GetNetwork()` returns `NET_UNROUTABLE` instead of
`NET_IPV4` or `NET_IPV6` and the network `NET_UNROUTABLE` is always
considered reachable.
It follows that `BF_EXPLICIT` is unnecessary, remove it too.
ACKs for top commit:
naumenkogs:
ACK 9cbfe40
aureleoules:
ACK 9cbfe40
mzumsande:
ACK 9cbfe40
Tree-SHA512: 4e53ee8a73ddd133fd4ff25635135b65e5c19d1fc56fe5c30337406560664616c0adff414dca47602948919f34c81073aae6bfc2871509f3912663d86750928e1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
| 99 | + | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
2231 | 2230 | | |
2232 | 2231 | | |
2233 | 2232 | | |
2234 | | - | |
2235 | | - | |
2236 | | - | |
2237 | 2233 | | |
2238 | 2234 | | |
2239 | 2235 | | |
| |||
2253 | 2249 | | |
2254 | 2250 | | |
2255 | 2251 | | |
2256 | | - | |
| 2252 | + | |
2257 | 2253 | | |
2258 | 2254 | | |
2259 | | - | |
| 2255 | + | |
2260 | 2256 | | |
2261 | 2257 | | |
2262 | | - | |
| 2258 | + | |
2263 | 2259 | | |
2264 | 2260 | | |
2265 | 2261 | | |
| |||
0 commit comments