test: Improve loopback address check in `rpc_bind.py` #35439

pull xyzconstant wants to merge 1 commits into bitcoin:master from xyzconstant:fix_loopback_check_in_rpc_bind_tests changing 1 files +1 −1
  1. xyzconstant commented at 10:03 PM on June 1, 2026: contributor

    A loopback address can range from 127.0.0.0 to 127.255.255.255. This commit relaxes the loopback check in rpc_bind.py by checking whether an IP address (from all_interfaces()) starts with '127.' instead of strictly matching '127.0.0.1'.

    Programs like VPNs might add an extra loopback address (e.g., 127.1.130.83), which failed under the previous state. These addresses will now pass with this update.


    For context: I found this while running tests with the Mullvad daemon active. Mullvad adds a custom lo0 interface like inet 127.141.11.239 netmask 0xff000000 that failed with --nonloopback, which should not be the case since the address is a valid loopback IP.

  2. test: Improve loopback address check in `rcp_bind.py`
    A loopback address can range from `127.0.0.0` to `127.255.255.255`.
    This commit relaxes the loopback check in `rpc_bind.py` by checking whether
    an IP address (from `all_interfaces()`) starts with `'127.'` instead of
    strictly matching `'127.0.0.1'`.
    
    Programs like VPNs might add an extra loopback address (e.g., 127.1.130.83),
    which failed under the previous state. These addresses will now pass with this update.
    c8b8c275fa
  3. DrahtBot added the label Tests on Jun 1, 2026
  4. DrahtBot commented at 10:03 PM on June 1, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, willcl-ark

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. xyzconstant renamed this:
    test: Improve loopback address check in `rcp_bind.py`
    test: Improve loopback address check in `rpc_bind.py`
    on Jun 1, 2026
  6. sedited requested review from willcl-ark on Jun 2, 2026
  7. maflcko commented at 9:44 AM on June 2, 2026: member

    lgtm ACK c8b8c275fa552b6205c6a84aa16053edd395af3c

  8. willcl-ark approved
  9. willcl-ark commented at 10:24 AM on June 2, 2026: member

    ACK c8b8c275fa552b6205c6a84aa16053edd395af3c

    Looks correct to me too.

  10. sedited merged this on Jun 2, 2026
  11. sedited closed this on Jun 2, 2026


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: 2026-06-11 10:51 UTC

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