From 7fd2338278357c38c1c40f0ff38e6f80c01e68f4 Mon Sep 17 00:00:00 2001 From: Marcus Wichelmann Date: Thu, 4 Aug 2022 13:08:41 +0200 Subject: [PATCH] Add the MTU to the generated client config to make sure both sides use the same MTU --- util/util.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/util.go b/util/util.go index ea97fcc..eb0c9a8 100644 --- a/util/util.go +++ b/util/util.go @@ -28,6 +28,7 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G if client.UseServerDNS { clientDNS = fmt.Sprintf("DNS = %s\n", strings.Join(setting.DNSServers, ",")) } + clientMTU := fmt.Sprintf("MTU = %d\n", setting.MTU) // Peer section peerPublicKey := fmt.Sprintf("PublicKey = %s\n", server.KeyPair.PublicKey) @@ -66,6 +67,7 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G clientAddress + clientPrivateKey + clientDNS + + clientMTU + forwardMark + "\n[Peer]\n" + peerPublicKey +