Fix BlockP2P to only bock connections to the Internet

This commit is contained in:
Daniel
2020-04-30 14:15:10 +02:00
parent 580144a676
commit 20e836b8ff

View File

@@ -163,8 +163,8 @@ func checkConnectionType(conn *network.Connection, _ packet.Packet) bool {
}
return true
}
case network.PeerLAN, network.PeerInternet, network.PeerInvalid:
// Important: PeerHost is and should be missing!
case network.PeerInternet:
// BlockP2P only applies to connections to the Internet
if p.BlockP2P() {
conn.Block("direct connections (P2P) blocked")
return true