Skip to content

QUIC announced addresses are silently dropped by the private-address filter #1646

Description

@Xcodes-chain

Environment

fnn built from PR #1644 head 478f146 (fnn Fiber v0.9.0 (478f146 2026-09-02)), release build, Linux x86_64
Node has a public IPv4 address; config contains both TCP and QUIC announced addresses
Config (relevant part)

fiber:
listening_addr: "/ip4/0.0.0.0/tcp/8999"
listening_addrs:
- "/ip4/0.0.0.0/udp/8999/quic-v1"
announce_listening_addr: true
announced_addrs:
- "/ip4/<PUBLIC_IP>/tcp/8999"
- "/ip4/<PUBLIC_IP>/udp/8999/quic-v1"
Expected
node_info.addresses contains both public addresses, including /ip4/<PUBLIC_IP>/udp/8999/quic-v1/p2p/, and the QUIC address is propagated to other nodes via NodeAnnouncement gossip.

Actual
node_info.addresses only contains the TCP address. The QUIC announced address is silently dropped and therefore never gossiped. The UDP/QUIC listener itself works (visible in ss -lunp), only announcement is affected.

Root cause
In crates/fiber-lib/src/fiber/network.rs, announced addresses are filtered unless announce_private_addr is set:

if !config.announce_private_addr.unwrap_or_default() {
announced_addrs.retain(crate::utils::is_addr_reachable);
}
is_addr_reachable (crates/fiber-lib/src/utils/mod.rs) handles DNS and onion addresses specially, but for IP-based addresses it delegates to tentacle's multiaddr_to_socketaddr (tentacle 0.7.7, src/utils.rs:97), which only matches /ip4|ip6/tcp/... tuples. For a QUIC multiaddr (/ip4//udp//quic-v1[/p2p/]) it returns None, so unwrap_or_default() makes the address count as unreachable and it is removed — even when the IP is public.

Impact

Public QUIC addresses configured in announced_addrs never appear in node_info.addresses and are never announced to the network, so third-party nodes cannot discover a node's QUIC address via gossip (breaks the discovery scenario the PR intends to support).
Direct dialing via an explicit QUIC multiaddr in connect_peer is unaffected.
Workaround
Set announce_private_addr: true to skip the reachability filter (side effect: 0.0.0.0 listen addresses are also announced).

Suggested fix
Make the reachability check transport-aware, e.g. in is_addr_reachable also extract the socket address for Udp protocols (or use tentacle::utils::find_type / TransportType::QuicV1 to recognize QUIC multiaddrs and check the IP part with is_reachable regardless of transport).

Evidence

Without workaround: node_info.addresses = only /ip4/<PUBLIC_IP>/tcp/8999/p2p/QmU7dJ4...
With announce_private_addr: true: addresses include /ip4/<PUBLIC_IP>/udp/8999/quic-v1/p2p/QmU7dJ4...
Verified during public-network acceptance testing between two AWS hosts (test02/test05).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions