client-interface-cleanup #6
@ -163,24 +163,21 @@ func (r *remoteFSM) stateServer_onSyn(msg controlMsg[packetSyn]) {
|
||||
r.lastSeen = time.Now()
|
||||
p := msg.Packet
|
||||
|
||||
if p.TraceID == r.traceID {
|
||||
return
|
||||
}
|
||||
|
||||
r.traceID = p.TraceID
|
||||
|
||||
// Before we can respond to this packet, we need to make sure the
|
||||
// route is setup properly.
|
||||
conf := r.conf()
|
||||
|
||||
conf.Up = true
|
||||
conf.Direct = p.Direct
|
||||
conf.DirectAddr = msg.SrcAddr
|
||||
// New trace ID => Update the route configuration.
|
||||
if p.TraceID != r.traceID {
|
||||
r.traceID = p.TraceID
|
||||
|
||||
conf.DataCipher = newDataCipherFromKey(p.SharedKey)
|
||||
conf.Up = true
|
||||
conf.Direct = p.Direct
|
||||
conf.DirectAddr = msg.SrcAddr
|
||||
|
||||
r.updateConf(conf)
|
||||
r.logf("Got SYN.")
|
||||
conf.DataCipher = newDataCipherFromKey(p.SharedKey)
|
||||
|
||||
r.updateConf(conf)
|
||||
r.logf("Got SYN.")
|
||||
}
|
||||
|
||||
r.sendControl(conf, packetAck{
|
||||
TraceID: p.TraceID,
|
||||
|
Loading…
x
Reference in New Issue
Block a user