Merge pull request #900 from gravitl/bugfix_v0.12.0_ext_client_mtu

ext client MTU
This commit is contained in:
Alex Feiszli 2022-03-15 09:20:41 -04:00 committed by GitHub
commit b73272bdee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,9 +151,15 @@ func getExtClientConf(w http.ResponseWriter, r *http.Request) {
if network.DefaultExtClientDNS != "" {
defaultDNS = "DNS = " + network.DefaultExtClientDNS
}
defaultMTU := 1420
if gwnode.MTU != 0 {
defaultMTU = int(gwnode.MTU)
}
config := fmt.Sprintf(`[Interface]
Address = %s
PrivateKey = %s
MTU = %d
%s
[Peer]
@ -164,6 +170,7 @@ Endpoint = %s
`, client.Address+"/32",
client.PrivateKey,
defaultMTU,
defaultDNS,
gwnode.PublicKey,
newAllowedIPs,