Add option to disable sending remote address in init#2285
Conversation
When running behind a load balancer that doesn't preserve the client source IP address, it doesn't make sense to include the `remote-address` tlv in our `init` message, it will contain an IP address that is completely unrelated to our peer. Fixes #2256
Codecov Report
@@ Coverage Diff @@
## master #2285 +/- ##
==========================================
+ Coverage 84.32% 84.33% +0.01%
==========================================
Files 194 194
Lines 14411 14412 +1
Branches 567 591 +24
==========================================
+ Hits 12152 12155 +3
+ Misses 2259 2257 -2
|
pm47
left a comment
There was a problem hiding this comment.
I'm not sure this is really necessary (we could fix our deployment, it's as simple as advertising a different public ip), but it doesn't cost much to support not sending the tlv, so I'll leave it to you to decide.
| ("killIdleDelay" | finiteDurationCodec) :: | ||
| ("maxOnionMessagesPerSecond" | int32)).as[PeerConnection.Conf] | ||
| ("maxOnionMessagesPerSecond" | int32) :: | ||
| ("sendRemoteAddressInit" | bool(8))).as[PeerConnection.Conf] |
There was a problem hiding this comment.
Should be bool8 but apparently we have other "violations" in that file.
There was a problem hiding this comment.
I saw that, that's why I chose to be consistent instead of using bool8. I'll do a follow-up tiny refactoring to move to bool8 everywhere in another PR.
But if we advertise the IP that doesn't go through the load balancer, it negates the benefits of having a load balancer, doesn't it? |
When running behind a load balancer that doesn't preserve the client source IP address, it doesn't make sense to include the `remote-address` tlv in our `init` message, it will contain an IP address that is completely unrelated to our peer. Fixes ACINQ#2256
When running behind a load balancer that doesn't preserve the client source IP address, it doesn't make sense to include the
remote-addresstlv in ourinitmessage, it will contain an IP address that is completely unrelated to our peer.Fixes #2256