1 parent
848d852e0d
commit
2649796369
3 files changed
+70
-58
No files matched your search
+3
-17
@@ -99,26 +99,12 @@ func (conn *LocalConnection) CheckFatal(err error) error {
|
||||
func (conn *LocalConnection) setEffectivePMTU(pmtu int) {
|
||||
conn.Lock()
|
||||
defer conn.Unlock()
|
||||
conn.effectivePMTU = pmtu
|
||||
conn.pmtuVerified = false
|
||||
conn.log("Effective PMTU set to", pmtu)
|
||||
}
|
||||
|
||||
func (conn *LocalConnection) effectivePMTUVerification(pmtu int) {
|
||||
conn.Lock()
|
||||
defer conn.Unlock()
|
||||
if pmtu == conn.effectivePMTU && !conn.pmtuVerified {
|
||||
conn.pmtuVerified = true
|
||||
conn.log("Effective PMTU verified at", pmtu)
|
||||
if (conn.effectivePMTU != pmtu) {
|
||||
conn.effectivePMTU = pmtu
|
||||
conn.log("Effective PMTU set to", pmtu)
|
||||
}
|
||||
}
|
||||
|
||||
func (conn *LocalConnection) isEffectivePMTUVerfied() bool {
|
||||
conn.RLock()
|
||||
defer conn.RUnlock()
|
||||
return conn.pmtuVerified
|
||||
}
|
||||
|
||||
// Called by the connection's actor process, by the connection's
|
||||
// heartbeat process and by the connection's TCP received
|
||||
// process. StackFrag is read in conn.Forward (called by router udp
|
||||
|
||||
Reference in new issue
Block a user