cosmetic: don't mention UDP in mesh

This commit is contained in:
Matthias Radestock committed 2015-11-09 19:47:27 +00:00
1 parent dd7ffa4501
commit 1eed5fd271
2 files changed
+2 -5

No files matched your search

+2 -2
View File
@@ -35,7 +35,8 @@ func FormSessionKey(remotePublicKey, localPrivateKey *[32]byte, secretKey []byte
// sender - '1' for outbound; the next indicates protocol type - '1'
// for TCP. The remaining 126 bits are zero. The polarity is needed so
// that the two ends of a connection do not use the same nonces; the
// protocol type so that the TCP and UDP sender nonces are disjoint.
// protocol type so that the TCP connection nonces are distinct from
// nonces used by overlay connections, if they share the session key.
// This is a requirement of the NaCl Security Model; see
// http://nacl.cr.yp.to/box.html.
type TCPCryptoState struct {
@@ -49,7 +50,6 @@ func NewTCPCryptoState(sessionKey *[32]byte, outbound bool) *TCPCryptoState {
if outbound {
s.nonce[0] |= (1 << 7)
}
// Ensure that TCP and UDP sequences are disjoint
s.nonce[0] |= (1 << 6)
return s
}
-3
View File
@@ -109,9 +109,6 @@ func (router *Router) listenTCP(localPort int) {
}
func (router *Router) acceptTCP(tcpConn *net.TCPConn) {
// someone else is dialing us, so our udp sender is the conn
// on router.Port and we wait for them to send us something on UDP to
// start.
remoteAddrStr := tcpConn.RemoteAddr().String()
log.Printf("->[%s] connection accepted", remoteAddrStr)
connRemote := NewRemoteConnection(router.Ourself.Peer, nil, remoteAddrStr, false, false)