mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
bep/1.0 negotiation can't be a hard error.
This commit is contained in:
parent
19e82e93b1
commit
51c932164f
@ -44,12 +44,11 @@ next:
|
|||||||
cs := conn.ConnectionState()
|
cs := conn.ConnectionState()
|
||||||
|
|
||||||
// We should have negotiated the next level protocol "bep/1.0" as part
|
// We should have negotiated the next level protocol "bep/1.0" as part
|
||||||
// of the TLS handshake. If we didn't, we're not speaking to another
|
// of the TLS handshake. Unfortunately this can't be a hard error,
|
||||||
// BEP-speaker so drop the connection.
|
// because there are implementations out there that don't support
|
||||||
|
// protocol negotiation (iOS for one...).
|
||||||
if !cs.NegotiatedProtocolIsMutual || cs.NegotiatedProtocol != bepProtocolName {
|
if !cs.NegotiatedProtocolIsMutual || cs.NegotiatedProtocol != bepProtocolName {
|
||||||
l.Infof("Peer %s did not negotiate bep/1.0", conn.RemoteAddr())
|
l.Infof("Peer %s did not negotiate bep/1.0", conn.RemoteAddr())
|
||||||
conn.Close()
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We should have received exactly one certificate from the other
|
// We should have received exactly one certificate from the other
|
||||||
|
Loading…
Reference in New Issue
Block a user