Skip to content
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

filtersConnectionGater not processing inbound connections #1002

Closed
aschmahmann opened this issue Sep 10, 2020 · 0 comments · Fixed by #1004
Closed

filtersConnectionGater not processing inbound connections #1002

aschmahmann opened this issue Sep 10, 2020 · 0 comments · Fixed by #1004
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@aschmahmann
Copy link
Collaborator

func (f *filtersConnectionGater) InterceptAddrDial(_ peer.ID, addr ma.Multiaddr) (allow bool) {
return !(*ma.Filters)(f).AddrBlocked(addr)
}
func (f *filtersConnectionGater) InterceptPeerDial(p peer.ID) (allow bool) {
return true
}
func (f *filtersConnectionGater) InterceptAccept(_ network.ConnMultiaddrs) (allow bool) {
return true
}
func (f *filtersConnectionGater) InterceptSecured(_ network.Direction, _ peer.ID, _ network.ConnMultiaddrs) (allow bool) {
return true
}
func (f *filtersConnectionGater) InterceptUpgraded(_ network.Conn) (allow bool, reason control.DisconnectReason) {
return true, 0
}
returns true for everything except for outbound dials. This is a regression from previous behavior of the AddrFilters.

^^ @aarshkshah1992 @raulk

@aschmahmann aschmahmann added the kind/bug A bug in existing code (including security flaws) label Sep 10, 2020
@aschmahmann aschmahmann changed the title filtersConnectionGater not blocking inbound connections filtersConnectionGater not processing inbound connections Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant