chat: skip own addresses from remote in member_sync_recv
Remote peers should not overwrite local node_addresses. When member_sync_recv processes data about our own node_id, we trust locally-synced addresses (from sync_my_addresses) and ignore address data from the remote peer.
This commit is contained in:
1 parent
f9b591b79a
commit
914e3ff7b4
1 file changed
+4
-1
@@ -405,7 +405,10 @@ static int _member_apply_items(void* ctx, const char* ns, uint64_t from_peer,
|
||||
}
|
||||
}
|
||||
if (adm_ver < 0) { mp += consumed; mrem -= (size_t)consumed; continue; }
|
||||
member_sync_put(inst, ns, nid, x25, ed, jsig, jts, usig, uts, nm, addrs, (int)ac, atags[0] ? atags : NULL, atsig, adm_storage);
|
||||
member_sync_put(inst, ns, nid, x25, ed, jsig, jts, usig, uts, nm,
|
||||
nid != inst->node_id ? addrs : NULL,
|
||||
nid != inst->node_id ? (int)ac : 0,
|
||||
atags[0] ? atags : NULL, atsig, adm_storage);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "%s: [ADDR_SYNC] member_sync recv ns=%s nid=0x%016llx ac=%d adm_ver=%d storage=%d", MS_ID, ns, (unsigned long long)nid, ac, adm_ver, adm_storage);
|
||||
/* fire node_props_changed callbacks */
|
||||
{ struct ms_props_cbk* pc = g_props_cbks;
|
||||
|
||||
Reference in new issue
Block a user