net: Execute Discover() when bind=0.0.0.0 or :: is set #33935

pull psam21 wants to merge 1 commits into bitcoin:master from psam21:fix-discover-bind-any changing 1 files +22 −1
  1. psam21 commented at 12:32 pm on November 24, 2025: none

    Fixes #31293

    When using -bind=0.0.0.0:port or -bind=[::]:port (or their -whitebind equivalents), the Discover() function was not being executed because bind_on_any was set to false when explicit bind addresses were provided.

    This meant that nodes using explicit “any” bind addresses would not discover and advertise their own local addresses to peers, even though they were effectively listening on all interfaces.

    This commit checks if any of the explicitly provided -bind or -whitebind addresses are “any” addresses (0.0.0.0 or ::) and ensures Discover() runs in those cases, matching the behavior when no explicit bind is given.

  2. net: Execute Discover() when bind=0.0.0.0 or :: is set
    When using -bind=0.0.0.0:port or -bind=[::]:port (or their -whitebind
    equivalents), the Discover() function was not being executed because
    bind_on_any was set to false when explicit bind addresses were provided.
    
    This meant that nodes using explicit "any" bind addresses would not
    discover and advertise their own local addresses to peers, even though
    they were effectively listening on all interfaces.
    
    This commit checks if any of the explicitly provided -bind or -whitebind
    addresses are "any" addresses (0.0.0.0 or ::) and ensures Discover()
    runs in those cases, matching the behavior when no explicit bind is given.
    
    Fixes #31293
    7b42ca7529
  3. DrahtBot added the label P2P on Nov 24, 2025
  4. DrahtBot commented at 12:32 pm on November 24, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33935.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  5. maflcko commented at 12:59 pm on November 24, 2025: member
    Thx, but instead of opening a third (3rd) pull request to fix this, it would be better to review the first two and possibly explain why they are insufficient and why a third pull request is needed.
  6. maflcko closed this on Nov 24, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-28 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me