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 bind-address-4 to upnp #845
Conversation
5bc4ac4
to
754f4e4
Compare
e28bf5d
to
3e8e8e1
Compare
3e8e8e1
to
782cf31
Compare
eb7e7c6
to
c16701b
Compare
c16701b
to
183b56e
Compare
183b56e
to
31cef98
Compare
31cef98
to
97356f4
Compare
@ckerr rebased this patch for the C++ change. I need to test that it's still working, but otherwise I think it's ready for review. |
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.
It's failing to build in CI:
port-forwarding.cc:98:106: error: no member named 'public_ipv4' in 'tr_session' [clang-diagnostic-error]
tr_upnpPulse(s->upnp, private_peer_port, is_enabled, do_check, tr_address_to_string(&s->session->public_ipv4->addr));
~~~~~~~~~~ ^
Pass the bind-address-ipv4 to upnpDiscover to allow for upnp to only use the interface specified. Prevents upnp packet leaks.
97356f4
to
4c0fc7e
Compare
Well that's on me for not testing even that it compiles, I apologize. As for actually testing the feature, as far as I can tell it seems to be working. When I set the bind addr to |
Also, I was unable to commit without adding
Yet I never touched that file, I assume it's unrelated. |
Yep, I've seen that one too. CI is running clang-tidy 12, but clang-tidy 13 sees quark.cc:415 differently. Unrelated to this PR. |
Pass the bind-address-ipv4 to upnpDiscover to allow for upnp to only use the interface specified. Prevents upnp packet leaks. Authored-by: LaserEyess <lasereyess@lasereyess.net>
Make sure the bind-address-4 address is being passed to upnp. This does not affect ipv6 (which shouldn't need either UPnP or NAT-PMP).
Fixes #804, but does not solve the issue for NAT-PMP, which requires knowledge of the gateway. If there is a way to do that properly, and cross platform, I think that should be another PR.
Based on https://trac.transmissionbt.com/ticket/5990