-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixed bug for inbound connections gated by the deprecated filter option #1004
Fixed bug for inbound connections gated by the deprecated filter option #1004
Conversation
@jalextowle LGTM modulo test refactor. |
func (f *filtersConnectionGater) InterceptAccept(_ network.ConnMultiaddrs) (allow bool) { | ||
return true | ||
func (f *filtersConnectionGater) InterceptAccept(connAddr network.ConnMultiaddrs) (allow bool) { | ||
return !(*ma.Filters)(f).AddrBlocked(connAddr.RemoteMultiaddr()) |
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.
@aarshkshah1992 is this the only place to do this? Don't we need something for at least InterceptSecured if not InterceptUpgraded also?
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.
An InterceptUpgraded
wont do match for us here as all those rejections will happen in InterceptAccepted
also(an incoming connection is first accepted and then secured). We didn't have the notion of rejecting connections at different "lifecycle states" when we had this old filter.
However, there is no harm in doing so and I am okay either ways.
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.
Actually @aschmahmann , we might need this for QUIC. Thanks for catching this.
@jalextowle Please can you add a similar behaviour to InterceptSecured
as well ?
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.
@aarshkshah1992 Yep, I added that behavior.
Partially fixes: #1002