Commit 9465e20
fix(peermgr): default SSL-only friends to RS_NODE_PERM_NONE
addSslOnlyFriend() registers a friend without creating an entry in
mFriendsPermissionFlags. This is the path taken by every short-invite
add (webui, mobile, QR code). Later, gossip discovery
(p3gossipdiscovery.cc) and loadList() call addFriend() with the
RS_NODE_PERM_ALL "keep existing flags" mask, which is only reduced
(service_flags &= entry) when a per-friend entry already exists.
For SSL-only friends no entry exists, so the RS_NODE_PERM_ALL mask is
written verbatim and persisted, silently granting the peer
DIRECT_DL | ALLOW_PUSH | REQUIRE_WL. The stray REQUIRE_WL then makes
incoming connections from non-whitelisted addresses get refused
(NOT_WHITELISTED) in pqissl::accept_locked(), spamming the log with
"This should never happen at this point!" stack traces.
GUI-added friends are unaffected because addFriend() always writes an
entry (RS_NODE_PERM_DEFAULT). Establish the same default here so the
downstream mask stays a no-op.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 92cf193 commit 9465e20
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1188 | 1201 | | |
1189 | 1202 | | |
1190 | 1203 | | |
| |||
0 commit comments