]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/govpn/cmd/govpn-server/conf.go
Configure MTU on per-user basis
[govpn.git] / src / govpn / cmd / govpn-server / conf.go
index 76d56cd8ae9f5185e954ff2dbc729b28a40c15f0..809c56d8c9453e4678b97ad49e32db0cf5c337fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
 GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -53,14 +53,23 @@ func confRead() map[govpn.PeerId]*govpn.PeerConf {
                if err != nil {
                        log.Fatalln("Unable to decode the key:", err.Error(), pc.VerifierRaw)
                }
+               if pc.EncLess {
+                       pc.Noise = true
+               }
+               if pc.MTU == 0 {
+                       pc.MTU = govpn.MTUDefault
+               }
                conf := govpn.PeerConf{
                        Verifier: verifier,
                        Id:       verifier.Id,
                        Name:     name,
+                       Iface:    pc.Iface,
+                       MTU:      pc.MTU,
                        Up:       pc.Up,
                        Down:     pc.Down,
                        Noise:    pc.Noise,
                        CPR:      pc.CPR,
+                       EncLess:  pc.EncLess,
                }
                if pc.TimeoutInt <= 0 {
                        pc.TimeoutInt = govpn.TimeoutDefault