mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-05-20 08:41:29 +00:00
Problem: StartReplicaReceiver didn't forward advertisedHost to NewReplicaReceiver, so wildcard-bind listeners relied on outbound-IP fallback for canonicalization. On multi-NIC hosts this could select the wrong interface, leaking non-routable addresses into replication truth. Fix: - blockvol.go: StartReplicaReceiver now accepts optional advertisedHost variadic param and forwards it to NewReplicaReceiver - volume_server_block.go: setupReplicaReceiver extracts host from localServerID (the canonical VS identity) and passes it as advertisedHost — wildcard-bind addresses now resolve to the authoritative server IP, not outbound-IP fallback Proof (sync_all_bug_test.go TestBug3, upgraded from PASS* to PASS): - fallback: wildcard bind without advertisedHost still produces ip:port - advertisedHost: explicit host appears in exported DataAddr/CtrlAddr - StartReplicaReceiver_API: public API forwards advertisedHost correctly What CP13-2 does NOT change: - No reconnect handshake changes (CP13-5) - No retention policy changes (CP13-6) - No rebuild behavior changes (CP13-7) - No barrier protocol changes (CP13-3) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>