Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: peer_control getinfo to show correct port on discovered IPs #5585

Merged

Commits on Sep 12, 2022

  1. peer_control: getinfo show correct port on discovered IPs

    Changelog-Fixed: peer_control: getinfo shows the correct port on discovered IPs
    m-schmoock committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    bcb6d32 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2022

  1. gossipd: rename remote_addr to discovered_ip within gossipd

    This is cleaner because, the `remote_addr` and `discovered_ip` are
    related but two different things.
    
    Within connectd and lightningd we use the peers `remote_addr` feature
    to validate (and guess a port) to be used for IP discovery.
    
    Also when a peer reports us a `remote_addr`, this is given to the plugin API
    via the `peer_connected` hook. The network port here is not modified for
    godd reason! This can be used i.e. to detect if we are behind a NAT.
    
    But once lightningd figures enough peers report the same `remote_addr`,
    it sets the port to the selected network and tells gossipd to use that for
    `node_announcement` updates.
    
    Hence, within gossipd, there is no (should not be) `remote_addr`.
    
    Changelog-None
    m-schmoock committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    8fb6ed8 View commit details
    Browse the repository at this point in the history