Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Enabling listening on tcp port when proxy is used for peer connections #7726
base: RC_2_0
Are you sure you want to change the base?
Enabling listening on tcp port when proxy is used for peer connections #7726
Changes from 4 commits
3bacdcc
4bf0c21
2db609b
eb2a910
91081ce
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 think it would be better to update or extend this comment, rather than removing it
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 would have expected this also depend on the
listen_on_proxy
setting, no?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.
if you don't configure a proxy and leave
listen_on_proxy
asfalse
; it looks like this change would disable NAT-PMP in that case. I think what you meant to do was to add another condition to theflags & proxy
check.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 think there might be a simpler way of doing this. Rather than checking the settings here, I think you should be able to check the
listen_socket_t::accept_incoming
flag. You'd have to make sure this flag is set correctly depending on thelisten_on_proxy
setting when the sockets are created thoughThere 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.
@arvidn would it be acceptable to just remove the proxy being a factor in whether the user can enable natpmp? Or is this something that is best left in another PR/Issue/Discussion?
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.
This is not right. the
&
is a bit-wise AND operation. you can mask theflags
field against flags/bits set in this field.get_bool()
returns abool
, not a flag value. I think you meant to preserve the existing check and add this additional one.