Commit 9cbfe40
committed
net: remove useless call to IsReachable() from CConnman::Bind()
`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.1 parent 62c8646 commit 9cbfe40
1 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 | | |
| |||
2204 | 2203 | | |
2205 | 2204 | | |
2206 | 2205 | | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | 2206 | | |
2211 | 2207 | | |
2212 | 2208 | | |
| |||
2226 | 2222 | | |
2227 | 2223 | | |
2228 | 2224 | | |
2229 | | - | |
| 2225 | + | |
2230 | 2226 | | |
2231 | 2227 | | |
2232 | | - | |
| 2228 | + | |
2233 | 2229 | | |
2234 | 2230 | | |
2235 | | - | |
| 2231 | + | |
2236 | 2232 | | |
2237 | 2233 | | |
2238 | 2234 | | |
| |||
0 commit comments