Restore sleeve compatibility with 1.1

Addresses #1396
This commit is contained in:
David Wragg committed 2015-09-21 08:33:11 +01:00
1 parent a67b9f566a
commit dc275d7009
4 files changed
+51 -51

No files matched your search

+4 -4
View File
@@ -376,8 +376,8 @@ func (conn *LocalConnection) forwarderCrypto() *OverlayCrypto {
}
}
func (conn *LocalConnection) sendOverlayControlMessage(msg []byte) error {
return conn.sendProtocolMsg(ProtocolMsg{ProtocolOverlayControlMsg, msg})
func (conn *LocalConnection) sendOverlayControlMessage(tag ProtocolTag, msg []byte) error {
return conn.sendProtocolMsg(ProtocolMsg{tag, msg})
}
type ConnectionAsForwarderListener struct{ conn *LocalConnection }
@@ -432,8 +432,8 @@ func (conn *LocalConnection) receiveTCP(receiver TCPReceiver) {
func (conn *LocalConnection) handleProtocolMsg(tag ProtocolTag, payload []byte) error {
switch tag {
case ProtocolHeartbeat:
case ProtocolOverlayControlMsg:
conn.forwarder.ControlMessage(payload)
case ProtocolConnectionEstablished, ProtocolFragmentationReceived, ProtocolPMTUVerified, ProtocolOverlayControlMsg:
conn.forwarder.ControlMessage(tag, payload)
case ProtocolGossipUnicast, ProtocolGossipBroadcast, ProtocolGossip:
return conn.Router.handleGossip(tag, payload)
default: