From 6f30cf2daf14a085df636bd12177d6426fa62d55 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 26 Aug 2014 21:11:24 +0100 Subject: [PATCH] 8 is better than 10 It's quite common for the real pmtu to be 8 less than what was advertised. --- docs/architecture.txt | 2 +- forwarder.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/architecture.txt b/docs/architecture.txt index 3f6480dd..5cfb4a73 100644 --- a/docs/architecture.txt +++ b/docs/architecture.txt @@ -204,6 +204,6 @@ and gets an error informing it of a new PMTU, it will attempt to verify that PMTU by sending packets of exactly that size to the remote peer. If it gets no indication from the remote weave that these packets have been received within a timeout period, it will -artificially drop the PMTU by 10 and try again. Thus this will slowly +artificially drop the PMTU by 8 and try again. Thus this will slowly reduce the PMTU until a working PMTU is found. This is slow, but it does work and works around ICMP packets being dropped. diff --git a/forwarder.go b/forwarder.go index 2566877f..e642511a 100644 --- a/forwarder.go +++ b/forwarder.go @@ -146,8 +146,8 @@ func (conn *LocalConnection) forwarderLoop(forwardCh <-chan *ForwardedFrame, sto // to other data. pmtuVerifyTick = nil if !conn.isClientPMTUVerfied() { - clientPMTU -= 10 - maxPayload -= 10 + clientPMTU -= 8 + maxPayload -= 8 updateClientPMTU() } case frame = <-forwardCh: