Commit 9a7e5f4
committed
net: don't extra bind for Tor if binds are restricted
If only `-bind=addr:port` is given (without `-bind=...=onion`) then we
would bind to `addr:port` _and_ to `127.0.0.1:8334` in addition which
may be unexpected, assuming the semantic of `-bind=addr:port` is
"bind _only_ to `addr:port`".
Change the above to not do the additional bind: if only
`-bind=addr:port` is given (without `-bind=...=onion`) then bind to
`addr:port` (only). If we are creating a Tor hidden service then use
`addr:port` as target (same behavior as before
bitcoin/bitcoin#19991).
This allows disabling binding on the onion port.
Fixes bitcoin/bitcoin#227261 parent 2f6dca4 commit 9a7e5f4
2 files changed
+16
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1890 | 1890 | | |
1891 | 1891 | | |
1892 | 1892 | | |
| 1893 | + | |
| 1894 | + | |
1893 | 1895 | | |
1894 | 1896 | | |
1895 | 1897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
63 | 72 | | |
64 | | - | |
65 | | - | |
| 73 | + | |
66 | 74 | | |
67 | 75 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
0 commit comments