-
Notifications
You must be signed in to change notification settings - Fork 268
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
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -108,7 +108,8 @@ object EclairInternalsSerializer { | |||
("pingDisconnect" | bool(8)) :: | |||
("maxRebroadcastDelay" | finiteDurationCodec) :: | |||
("killIdleDelay" | finiteDurationCodec) :: | |||
("maxOnionMessagesPerSecond" | int32)).as[PeerConnection.Conf] | |||
("maxOnionMessagesPerSecond" | int32) :: | |||
("sendRemoteAddressInit" | bool(8))).as[PeerConnection.Conf] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be bool8
but apparently we have other "violations" in that file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-address
tlv in ourinit
message, it will contain an IP address that is completely unrelated to our peer.Fixes #2256