Merge pull request #2218 from lucas-clemente/pto-per-pn-space

change PTO to be per packet number space
This commit is contained in:
Marten Seemann
2019-11-22 18:35:05 +08:00
committed by GitHub
18 changed files with 492 additions and 241 deletions

View File

@@ -99,7 +99,7 @@ func (a *updatableAEAD) rollKeys(now time.Time) {
a.numRcvdWithCurrentKey = 0
a.numSentWithCurrentKey = 0
a.prevRcvAEAD = a.rcvAEAD
a.prevRcvAEADExpiry = now.Add(3 * a.rttStats.PTO())
a.prevRcvAEADExpiry = now.Add(3 * a.rttStats.PTO(true))
a.rcvAEAD = a.nextRcvAEAD
a.sendAEAD = a.nextSendAEAD