From d7eadeb523e70e0c1fd13f3f7a2e43c37ca10113 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Sat, 15 Apr 2023 13:45:20 +0200 Subject: [PATCH] fix corrupted packets when udpMaxPayloadSize is not set (#1702) (#1711) this happened when udpMaxPayloadSize was not explicitly set in configuration file. --- internal/conf/conf.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/conf/conf.go b/internal/conf/conf.go index 1f33690bcb1..bc45a0c34de 100644 --- a/internal/conf/conf.go +++ b/internal/conf/conf.go @@ -326,10 +326,10 @@ func (conf *Conf) CheckAndFillMissing() error { return fmt.Errorf("'readBufferCount' must be a power of two") } if conf.UDPMaxPayloadSize == 0 { - conf.UDPMaxPayloadSize = 1500 + conf.UDPMaxPayloadSize = 1472 } - if conf.UDPMaxPayloadSize > 1500 { - return fmt.Errorf("'udpMaxPayloadSize' must be less than 1500") + if conf.UDPMaxPayloadSize > 1472 { + return fmt.Errorf("'udpMaxPayloadSize' must be less than 1472") } if conf.ExternalAuthenticationURL != "" { if !strings.HasPrefix(conf.ExternalAuthenticationURL, "http://") &&