This fixes a potential bug where some NATs may replace the node's interal IP with its external IP in version messages, causing incorrect checksums when version messages begin being checksummed on February 14, 2012.
Get ext. IP from UPnP, make sure addrMe IsRoutable() in version. #817
pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:dpiversionfix changing 1 files +21 −1-
TheBlueMatt commented at 5:25 AM on February 10, 2012: member
-
TheBlueMatt commented at 5:25 AM on February 10, 2012: member
-
baba6e7de2
Get ext. IP from UPnP, make sure addrMe IsRoutable() in version.
This fixes a potential bug where some NATs may replace the node's interal IP with its external IP in version messages, causing incorrect checksums when version messages begin being checksummed on February 14, 2012.
-
gmaxwell commented at 4:31 PM on February 10, 2012: contributor
This is a good idea regardless of the NAT issue.
There is no reason to leak internal non-routable addresses in version messages, and that part of the patch is clearly safe because using a proxy has the same effect (also because we don't actually do anything with that data).
Using UPNP to get our external IP is also a good idea. The current dependance on centralized address identifying services is a bad one.
-
gavinandresen commented at 5:03 PM on February 10, 2012: contributor
ACK
-
sipa commented at 4:25 PM on February 11, 2012: member
ACK
-
gmaxwell commented at 9:07 PM on February 11, 2012: contributor
ACK, took me a while to setup upnp to test this.
- gmaxwell referenced this in commit 9f3de58d83 on Feb 11, 2012
- gmaxwell merged this on Feb 11, 2012
- gmaxwell closed this on Feb 11, 2012
- coblee referenced this in commit 36eaf84bb9 on Jul 17, 2012
- destenson referenced this in commit a4954bf0fd on Jun 26, 2016
- ptschip referenced this in commit 9df389cd01 on Dec 19, 2017
- lateminer referenced this in commit 37a06eaa93 on Feb 28, 2019
- Losangelosgenetics referenced this in commit 85f4fec1da on Mar 12, 2020
- DrahtBot locked this on Sep 8, 2021