… | |
… | |
97 | free (hostname); |
97 | free (hostname); |
98 | } |
98 | } |
99 | |
99 | |
100 | void configuration::init () |
100 | void configuration::init () |
101 | { |
101 | { |
|
|
102 | asprintf (&confbase, "%s/vpe", CONFDIR); |
|
|
103 | |
102 | memset (this, 0, sizeof (*this)); |
104 | memset (this, 0, sizeof (*this)); |
103 | |
105 | |
104 | mtu = DEFAULT_MTU; |
106 | mtu = DEFAULT_MTU; |
105 | rekey = DEFAULT_REKEY; |
107 | rekey = DEFAULT_REKEY; |
106 | keepalive = DEFAULT_KEEPALIVE; |
108 | keepalive = DEFAULT_KEEPALIVE; |
… | |
… | |
113 | default_node.udp_port = DEFAULT_UDPPORT; |
115 | default_node.udp_port = DEFAULT_UDPPORT; |
114 | default_node.tcp_port = DEFAULT_UDPPORT; // ehrm |
116 | default_node.tcp_port = DEFAULT_UDPPORT; // ehrm |
115 | default_node.connectmode = conf_node::C_ALWAYS; |
117 | default_node.connectmode = conf_node::C_ALWAYS; |
116 | default_node.compress = true; |
118 | default_node.compress = true; |
117 | default_node.protocols = PROT_UDPv4; |
119 | default_node.protocols = PROT_UDPv4; |
|
|
120 | |
|
|
121 | conf.pidfilename = strdup (LOCALSTATEDIR "/run/vped.pid"); |
118 | } |
122 | } |
119 | |
123 | |
120 | void configuration::cleanup() |
124 | void configuration::cleanup() |
121 | { |
125 | { |
122 | if (rsa_key) |
126 | if (rsa_key) |