mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-27 09:36:08 +08:00
Merge pull request #900 from gravitl/bugfix_v0.12.0_ext_client_mtu
ext client MTU
This commit is contained in:
commit
b73272bdee
1 changed files with 7 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue