WIP: Apparently working?
This commit is contained in:
@@ -156,16 +156,13 @@ func (r *remoteFSM) stateServer_onInit(msg controlMsg[packetInit]) {
|
||||
}
|
||||
|
||||
func (r *remoteFSM) stateServer_onSyn(msg controlMsg[packetSyn]) {
|
||||
r.logf("Got SYN: %v", msg.Packet)
|
||||
r.lastSeen = time.Now()
|
||||
p := msg.Packet
|
||||
|
||||
// Before we can respond to this packet, we need to make sure the
|
||||
// route is setup properly.
|
||||
conf := r.conf()
|
||||
if !conf.Up || conf.Direct != p.Direct {
|
||||
r.logf("Got SYN.")
|
||||
}
|
||||
logSyn := !conf.Up || conf.Direct != p.Direct
|
||||
|
||||
conf.Up = true
|
||||
conf.Direct = p.Direct
|
||||
@@ -179,6 +176,10 @@ func (r *remoteFSM) stateServer_onSyn(msg controlMsg[packetSyn]) {
|
||||
|
||||
r.updateConf(conf)
|
||||
|
||||
if logSyn {
|
||||
r.logf("Got SYN.")
|
||||
}
|
||||
|
||||
r.sendControl(conf, packetAck{
|
||||
TraceID: p.TraceID,
|
||||
ToAddr: conf.DirectAddr,
|
||||
@@ -429,7 +430,6 @@ func (r *remoteFSM) stateClient_onPingTimer() stateFunc {
|
||||
return r.enterClientInit()
|
||||
}
|
||||
|
||||
r.traceID = newTraceID()
|
||||
r.stateClient_sendSyn(conf)
|
||||
return r.stateClient
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user