… | |
… | |
82 | require (EVP_DigestUpdate(&ctx, &id, sizeof id)); |
82 | require (EVP_DigestUpdate(&ctx, &id, sizeof id)); |
83 | require (EVP_DigestFinal (&ctx, (unsigned char *)&h, 0)); |
83 | require (EVP_DigestFinal (&ctx, (unsigned char *)&h, 0)); |
84 | EVP_MD_CTX_cleanup (&ctx); |
84 | EVP_MD_CTX_cleanup (&ctx); |
85 | } |
85 | } |
86 | |
86 | |
87 | struct rsa_entry { |
87 | struct rsa_entry |
|
|
88 | { |
88 | tstamp expire; |
89 | tstamp expire; |
89 | rsaid id; |
90 | rsaid id; |
90 | rsachallenge chg; |
91 | rsachallenge chg; |
91 | }; |
92 | }; |
92 | |
93 | |
93 | struct rsa_cache : list<rsa_entry> |
94 | struct rsa_cache : list<rsa_entry> |
94 | { |
95 | { |
95 | void cleaner_cb (ev::timer &w, int revents); ev::timer cleaner; |
96 | inline void cleaner_cb (ev::timer &w, int revents); ev::timer cleaner; |
96 | |
97 | |
97 | bool find (const rsaid &id, rsachallenge &chg) |
98 | bool find (const rsaid &id, rsachallenge &chg) |
98 | { |
99 | { |
99 | for (iterator i = begin (); i != end (); ++i) |
100 | for (iterator i = begin (); i != end (); ++i) |
100 | { |
101 | { |
101 | if (!memcmp (&id, &i->id, sizeof id) && i->expire > ev::ev_now ()) |
102 | if (!memcmp (&id, &i->id, sizeof id) && i->expire > ev_now ()) |
102 | { |
103 | { |
103 | memcpy (&chg, &i->chg, sizeof chg); |
104 | memcpy (&chg, &i->chg, sizeof chg); |
104 | |
105 | |
105 | erase (i); |
106 | erase (i); |
106 | return true; |
107 | return true; |
… | |
… | |
118 | rsa_entry e; |
119 | rsa_entry e; |
119 | |
120 | |
120 | RAND_bytes ((unsigned char *)&id, sizeof id); |
121 | RAND_bytes ((unsigned char *)&id, sizeof id); |
121 | RAND_bytes ((unsigned char *)&chg, sizeof chg); |
122 | RAND_bytes ((unsigned char *)&chg, sizeof chg); |
122 | |
123 | |
123 | e.expire = ev::ev_now () + RSA_TTL; |
124 | e.expire = ev_now () + RSA_TTL; |
124 | e.id = id; |
125 | e.id = id; |
125 | memcpy (&e.chg, &chg, sizeof chg); |
126 | memcpy (&e.chg, &chg, sizeof chg); |
126 | |
127 | |
127 | push_back (e); |
128 | push_back (e); |
128 | |
129 | |
129 | if (!cleaner.is_active ()) |
130 | if (!cleaner.is_active ()) |
130 | cleaner.again (); |
131 | cleaner.again (); |
131 | } |
132 | } |
132 | |
133 | |
133 | rsa_cache () |
134 | rsa_cache () |
134 | : cleaner (this, &rsa_cache::cleaner_cb) |
|
|
135 | { |
135 | { |
|
|
136 | cleaner.set<rsa_cache, &rsa_cache::cleaner_cb> (this); |
136 | cleaner.set (RSA_TTL, RSA_TTL); |
137 | cleaner.set (RSA_TTL, RSA_TTL); |
137 | } |
138 | } |
138 | |
139 | |
139 | } rsa_cache; |
140 | } rsa_cache; |
140 | |
141 | |
… | |
… | |
143 | if (empty ()) |
144 | if (empty ()) |
144 | w.stop (); |
145 | w.stop (); |
145 | else |
146 | else |
146 | { |
147 | { |
147 | for (iterator i = begin (); i != end (); ) |
148 | for (iterator i = begin (); i != end (); ) |
148 | if (i->expire <= ev::ev_now ()) |
149 | if (i->expire <= ev_now ()) |
149 | i = erase (i); |
150 | i = erase (i); |
150 | else |
151 | else |
151 | ++i; |
152 | ++i; |
152 | } |
153 | } |
153 | } |
154 | } |
154 | |
155 | |
155 | ////////////////////////////////////////////////////////////////////////////// |
156 | ////////////////////////////////////////////////////////////////////////////// |
156 | |
157 | |
157 | void pkt_queue::put (net_packet *p) |
158 | pkt_queue::pkt_queue (double max_ttl, int max_queue) |
|
|
159 | : max_ttl (max_ttl), max_queue (max_queue) |
158 | { |
160 | { |
159 | if (queue[i]) |
161 | queue = new pkt [max_queue]; |
160 | { |
|
|
161 | delete queue[i]; |
|
|
162 | j = (j + 1) % QUEUEDEPTH; |
|
|
163 | } |
|
|
164 | |
162 | |
165 | queue[i] = p; |
|
|
166 | |
|
|
167 | i = (i + 1) % QUEUEDEPTH; |
|
|
168 | } |
|
|
169 | |
|
|
170 | net_packet *pkt_queue::get () |
|
|
171 | { |
|
|
172 | net_packet *p = queue[j]; |
|
|
173 | |
|
|
174 | if (p) |
|
|
175 | { |
|
|
176 | queue[j] = 0; |
|
|
177 | j = (j + 1) % QUEUEDEPTH; |
|
|
178 | } |
|
|
179 | |
|
|
180 | return p; |
|
|
181 | } |
|
|
182 | |
|
|
183 | pkt_queue::pkt_queue () |
|
|
184 | { |
|
|
185 | memset (queue, 0, sizeof (queue)); |
|
|
186 | i = 0; |
163 | i = 0; |
187 | j = 0; |
164 | j = 0; |
|
|
165 | |
|
|
166 | expire.set<pkt_queue, &pkt_queue::expire_cb> (this); |
188 | } |
167 | } |
189 | |
168 | |
190 | pkt_queue::~pkt_queue () |
169 | pkt_queue::~pkt_queue () |
191 | { |
170 | { |
192 | for (i = QUEUEDEPTH; --i > 0; ) |
171 | while (net_packet *p = get ()) |
|
|
172 | delete p; |
|
|
173 | |
193 | delete queue[i]; |
174 | delete [] queue; |
194 | } |
175 | } |
195 | |
176 | |
|
|
177 | void pkt_queue::expire_cb (ev::timer &w, int revents) |
|
|
178 | { |
|
|
179 | ev_tstamp expire = ev_now () - max_ttl; |
|
|
180 | |
|
|
181 | for (;;) |
|
|
182 | { |
|
|
183 | if (empty ()) |
|
|
184 | break; |
|
|
185 | |
|
|
186 | double diff = queue[j].tstamp - expire; |
|
|
187 | |
|
|
188 | if (diff >= 0.) |
|
|
189 | { |
|
|
190 | w.start (diff > 0.5 ? diff : 0.5); |
|
|
191 | break; |
|
|
192 | } |
|
|
193 | |
|
|
194 | delete get (); |
|
|
195 | } |
|
|
196 | } |
|
|
197 | |
|
|
198 | void pkt_queue::put (net_packet *p) |
|
|
199 | { |
|
|
200 | ev_tstamp now = ev_now (); |
|
|
201 | |
|
|
202 | // start expiry timer |
|
|
203 | if (empty ()) |
|
|
204 | expire.start (max_ttl); |
|
|
205 | |
|
|
206 | int ni = i + 1 == max_queue ? 0 : i + 1; |
|
|
207 | |
|
|
208 | if (ni == j) |
|
|
209 | delete get (); |
|
|
210 | |
|
|
211 | queue[i].pkt = p; |
|
|
212 | queue[i].tstamp = now; |
|
|
213 | |
|
|
214 | i = ni; |
|
|
215 | } |
|
|
216 | |
|
|
217 | net_packet *pkt_queue::get () |
|
|
218 | { |
|
|
219 | if (empty ()) |
|
|
220 | return 0; |
|
|
221 | |
|
|
222 | net_packet *p = queue[j].pkt; |
|
|
223 | queue[j].pkt = 0; |
|
|
224 | |
|
|
225 | j = j + 1 == max_queue ? 0 : j + 1; |
|
|
226 | |
|
|
227 | return p; |
|
|
228 | } |
|
|
229 | |
196 | struct net_rateinfo { |
230 | struct net_rateinfo |
|
|
231 | { |
197 | u32 host; |
232 | u32 host; |
198 | double pcnt, diff; |
233 | double pcnt, diff; |
199 | tstamp last; |
234 | tstamp last; |
200 | }; |
235 | }; |
201 | |
236 | |
… | |
… | |
220 | iterator i; |
255 | iterator i; |
221 | |
256 | |
222 | for (i = begin (); i != end (); ) |
257 | for (i = begin (); i != end (); ) |
223 | if (i->host == host) |
258 | if (i->host == host) |
224 | break; |
259 | break; |
225 | else if (i->last < ev::ev_now () - NRL_EXPIRE) |
260 | else if (i->last < ev_now () - NRL_EXPIRE) |
226 | i = erase (i); |
261 | i = erase (i); |
227 | else |
262 | else |
228 | i++; |
263 | i++; |
229 | |
264 | |
230 | if (i == end ()) |
265 | if (i == end ()) |
… | |
… | |
232 | net_rateinfo ri; |
267 | net_rateinfo ri; |
233 | |
268 | |
234 | ri.host = host; |
269 | ri.host = host; |
235 | ri.pcnt = 1.; |
270 | ri.pcnt = 1.; |
236 | ri.diff = NRL_MAXDIF; |
271 | ri.diff = NRL_MAXDIF; |
237 | ri.last = ev::ev_now (); |
272 | ri.last = ev_now (); |
238 | |
273 | |
239 | push_front (ri); |
274 | push_front (ri); |
240 | |
275 | |
241 | return true; |
276 | return true; |
242 | } |
277 | } |
… | |
… | |
244 | { |
279 | { |
245 | net_rateinfo ri (*i); |
280 | net_rateinfo ri (*i); |
246 | erase (i); |
281 | erase (i); |
247 | |
282 | |
248 | ri.pcnt = ri.pcnt * NRL_ALPHA; |
283 | ri.pcnt = ri.pcnt * NRL_ALPHA; |
249 | ri.diff = ri.diff * NRL_ALPHA + (ev::ev_now () - ri.last); |
284 | ri.diff = ri.diff * NRL_ALPHA + (ev_now () - ri.last); |
250 | |
285 | |
251 | ri.last = ev::ev_now (); |
286 | ri.last = ev_now (); |
252 | |
287 | |
253 | double dif = ri.diff / ri.pcnt; |
288 | double dif = ri.diff / ri.pcnt; |
254 | |
289 | |
255 | bool send = dif > NRL_CUTOFF; |
290 | bool send = dif > NRL_CUTOFF; |
256 | |
291 | |
… | |
… | |
588 | { |
623 | { |
589 | slog (L_TRACE, _("%s: possible connection establish (ictx %d, octx %d)"), conf->nodename, !!ictx, !!octx); |
624 | slog (L_TRACE, _("%s: possible connection establish (ictx %d, octx %d)"), conf->nodename, !!ictx, !!octx); |
590 | |
625 | |
591 | if (ictx && octx) |
626 | if (ictx && octx) |
592 | { |
627 | { |
593 | connectmode = conf->connectmode; |
|
|
594 | |
|
|
595 | // make sure rekeying timeouts are slightly asymmetric |
628 | // make sure rekeying timeouts are slightly asymmetric |
596 | ev::tstamp rekey_interval = ::conf.rekey + (conf->id > THISNODE->id ? 10 : 0); |
629 | ev::tstamp rekey_interval = ::conf.rekey + (conf->id > THISNODE->id ? 10 : 0); |
597 | rekey.start (rekey_interval, rekey_interval); |
630 | rekey.start (rekey_interval, rekey_interval); |
598 | keepalive.start (::conf.keepalive); |
631 | keepalive.start (::conf.keepalive); |
599 | |
632 | |
600 | // send queued packets |
633 | // send queued packets |
601 | if (ictx && octx) |
634 | if (ictx && octx) |
602 | { |
635 | { |
603 | while (tap_packet *p = (tap_packet *)data_queue.get ()) |
636 | while (tap_packet *p = (tap_packet *)data_queue.get ()) |
604 | { |
637 | { |
605 | send_data_packet (p); |
638 | if (p->len) send_data_packet (p); |
606 | delete p; |
639 | delete p; |
607 | } |
640 | } |
608 | |
641 | |
609 | while (vpn_packet *p = (vpn_packet *)vpn_queue.get ()) |
642 | while (vpn_packet *p = (vpn_packet *)vpn_queue.get ()) |
610 | { |
643 | { |
611 | send_vpn_packet (p, si, IPTOS_RELIABILITY); |
644 | if (p->len) send_vpn_packet (p, si, IPTOS_RELIABILITY); |
612 | delete p; |
645 | delete p; |
613 | } |
646 | } |
614 | } |
647 | } |
615 | } |
648 | } |
616 | else |
649 | else |
… | |
… | |
743 | send_vpn_packet (r, si); |
776 | send_vpn_packet (r, si); |
744 | |
777 | |
745 | delete r; |
778 | delete r; |
746 | } |
779 | } |
747 | |
780 | |
748 | void |
781 | inline void |
749 | connection::establish_connection_cb (ev::timer &w, int revents) |
782 | connection::establish_connection_cb (ev::timer &w, int revents) |
750 | { |
783 | { |
751 | if (!ictx |
784 | if (!ictx |
752 | && conf != THISNODE |
785 | && conf != THISNODE |
753 | && connectmode != conf_node::C_NEVER |
786 | && connectmode != conf_node::C_NEVER |
754 | && connectmode != conf_node::C_DISABLED |
787 | && connectmode != conf_node::C_DISABLED |
755 | && !w.is_active ()) |
788 | && !w.is_active ()) |
756 | { |
789 | { |
|
|
790 | // a bit hacky, if ondemand, and packets are no longer queued, then reset the connection |
|
|
791 | // and stop trying. should probably be handled by a per-connection expire handler. |
|
|
792 | if (connectmode == conf_node::C_ONDEMAND && vpn_queue.empty () && data_queue.empty ()) |
|
|
793 | { |
|
|
794 | reset_connection (); |
|
|
795 | return; |
|
|
796 | } |
|
|
797 | |
757 | ev::tstamp retry_int = ev::tstamp (retry_cnt & 3 |
798 | ev::tstamp retry_int = ev::tstamp (retry_cnt & 3 |
758 | ? (retry_cnt & 3) + 1 |
799 | ? (retry_cnt & 3) + 1 |
759 | : 1 << (retry_cnt >> 2)); |
800 | : 1 << (retry_cnt >> 2)); |
760 | |
801 | |
761 | reset_si (); |
802 | reset_si (); |
… | |
… | |
804 | { |
845 | { |
805 | slog (L_INFO, _("%s(%s): connection lost"), |
846 | slog (L_INFO, _("%s(%s): connection lost"), |
806 | conf->nodename, (const char *)si); |
847 | conf->nodename, (const char *)si); |
807 | |
848 | |
808 | if (::conf.script_node_down) |
849 | if (::conf.script_node_down) |
809 | if (!run_script (run_script_cb (this, &connection::script_node_down), false)) |
850 | { |
|
|
851 | run_script_cb cb; |
|
|
852 | cb.set<connection, &connection::script_node_down> (this); |
|
|
853 | if (!run_script (cb, false)) |
810 | slog (L_WARN, _("node-down command execution failed, continuing.")); |
854 | slog (L_WARN, _("node-down command execution failed, continuing.")); |
|
|
855 | } |
811 | } |
856 | } |
812 | |
857 | |
813 | delete ictx; ictx = 0; |
858 | delete ictx; ictx = 0; |
814 | delete octx; octx = 0; |
859 | delete octx; octx = 0; |
815 | #if ENABLE_DNS |
860 | #if ENABLE_DNS |
… | |
… | |
833 | send_reset (si); |
878 | send_reset (si); |
834 | |
879 | |
835 | reset_connection (); |
880 | reset_connection (); |
836 | } |
881 | } |
837 | |
882 | |
838 | void |
883 | inline void |
839 | connection::rekey_cb (ev::timer &w, int revents) |
884 | connection::rekey_cb (ev::timer &w, int revents) |
840 | { |
885 | { |
841 | reset_connection (); |
886 | reset_connection (); |
842 | establish_connection (); |
887 | establish_connection (); |
843 | } |
888 | } |
… | |
… | |
888 | } |
933 | } |
889 | |
934 | |
890 | void |
935 | void |
891 | connection::recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi) |
936 | connection::recv_vpn_packet (vpn_packet *pkt, const sockinfo &rsi) |
892 | { |
937 | { |
893 | last_activity = ev::ev_now (); |
938 | last_activity = ev_now (); |
894 | |
939 | |
895 | slog (L_NOISE, "<<%d received packet type %d from %d to %d", |
940 | slog (L_NOISE, "<<%d received packet type %d from %d to %d", |
896 | conf->id, pkt->typ (), pkt->src (), pkt->dst ()); |
941 | conf->id, pkt->typ (), pkt->src (), pkt->dst ()); |
897 | |
942 | |
898 | if (connectmode == conf_node::C_DISABLED) |
943 | if (connectmode == conf_node::C_DISABLED) |
… | |
… | |
1039 | slog (L_INFO, _("%s(%s): connection established, protocol version %d.%d"), |
1084 | slog (L_INFO, _("%s(%s): connection established, protocol version %d.%d"), |
1040 | conf->nodename, (const char *)rsi, |
1085 | conf->nodename, (const char *)rsi, |
1041 | p->prot_major, p->prot_minor); |
1086 | p->prot_major, p->prot_minor); |
1042 | |
1087 | |
1043 | if (::conf.script_node_up) |
1088 | if (::conf.script_node_up) |
1044 | if (!run_script (run_script_cb (this, &connection::script_node_up), false)) |
1089 | { |
|
|
1090 | run_script_cb cb; |
|
|
1091 | cb.set<connection, &connection::script_node_up> (this); |
|
|
1092 | if (!run_script (cb, false)) |
1045 | slog (L_WARN, _("node-up command execution failed, continuing.")); |
1093 | slog (L_WARN, _("node-up command execution failed, continuing.")); |
|
|
1094 | } |
1046 | |
1095 | |
1047 | break; |
1096 | break; |
1048 | } |
1097 | } |
1049 | else |
1098 | else |
1050 | slog (L_ERR, _("%s(%s): sent and received challenge do not match"), |
1099 | slog (L_ERR, _("%s(%s): sent and received challenge do not match"), |
… | |
… | |
1166 | send_reset (rsi); |
1215 | send_reset (rsi); |
1167 | break; |
1216 | break; |
1168 | } |
1217 | } |
1169 | } |
1218 | } |
1170 | |
1219 | |
|
|
1220 | inline void |
1171 | void connection::keepalive_cb (ev::timer &w, int revents) |
1221 | connection::keepalive_cb (ev::timer &w, int revents) |
1172 | { |
1222 | { |
1173 | if (ev::ev_now () >= last_activity + ::conf.keepalive + 30) |
1223 | if (ev_now () >= last_activity + ::conf.keepalive + 30) |
1174 | { |
1224 | { |
1175 | reset_connection (); |
1225 | reset_connection (); |
1176 | establish_connection (); |
1226 | establish_connection (); |
1177 | } |
1227 | } |
1178 | else if (ev::ev_now () < last_activity + ::conf.keepalive) |
1228 | else if (ev_now () < last_activity + ::conf.keepalive) |
1179 | w.start (last_activity + ::conf.keepalive - ev::now ()); |
1229 | w.start (last_activity + ::conf.keepalive - ev::now ()); |
1180 | else if (conf->connectmode != conf_node::C_ONDEMAND |
1230 | else if (conf->connectmode != conf_node::C_ONDEMAND |
1181 | || THISNODE->connectmode != conf_node::C_ONDEMAND) |
1231 | || THISNODE->connectmode != conf_node::C_ONDEMAND) |
1182 | { |
1232 | { |
1183 | send_ping (si); |
1233 | send_ping (si); |
1184 | w.start (5); |
1234 | w.start (5); |
1185 | } |
1235 | } |
1186 | else if (ev::ev_now () < last_activity + ::conf.keepalive + 10) |
1236 | else if (ev_now () < last_activity + ::conf.keepalive + 10) |
1187 | // hold ondemand connections implicitly a few seconds longer |
1237 | // hold ondemand connections implicitly a few seconds longer |
1188 | // should delete octx, though, or something like that ;) |
1238 | // should delete octx, though, or something like that ;) |
1189 | w.start (last_activity + ::conf.keepalive + 10 - ev::now ()); |
1239 | w.start (last_activity + ::conf.keepalive + 10 - ev::now ()); |
1190 | else |
1240 | else |
1191 | reset_connection (); |
1241 | reset_connection (); |
… | |
… | |
1221 | asprintf (&env, "DESTNODE=%s", conf->nodename); putenv (env); |
1271 | asprintf (&env, "DESTNODE=%s", conf->nodename); putenv (env); |
1222 | asprintf (&env, "DESTIP=%s", si.ntoa ()); putenv (env); |
1272 | asprintf (&env, "DESTIP=%s", si.ntoa ()); putenv (env); |
1223 | asprintf (&env, "DESTPORT=%d", ntohs (si.port)); putenv (env); |
1273 | asprintf (&env, "DESTPORT=%d", ntohs (si.port)); putenv (env); |
1224 | } |
1274 | } |
1225 | |
1275 | |
|
|
1276 | inline const char * |
1226 | const char *connection::script_node_up () |
1277 | connection::script_node_up () |
1227 | { |
1278 | { |
1228 | script_init_connect_env (); |
1279 | script_init_connect_env (); |
1229 | |
1280 | |
1230 | putenv ((char *)"STATE=up"); |
1281 | putenv ((char *)"STATE=up"); |
1231 | |
1282 | |
… | |
… | |
1236 | ::conf.script_node_up ? ::conf.script_node_up : "node-up"); |
1287 | ::conf.script_node_up ? ::conf.script_node_up : "node-up"); |
1237 | |
1288 | |
1238 | return filename; |
1289 | return filename; |
1239 | } |
1290 | } |
1240 | |
1291 | |
|
|
1292 | inline const char * |
1241 | const char *connection::script_node_down () |
1293 | connection::script_node_down () |
1242 | { |
1294 | { |
1243 | script_init_connect_env (); |
1295 | script_init_connect_env (); |
1244 | |
1296 | |
1245 | putenv ((char *)"STATE=down"); |
1297 | putenv ((char *)"STATE=down"); |
1246 | |
1298 | |
… | |
… | |
1252 | |
1304 | |
1253 | return filename; |
1305 | return filename; |
1254 | } |
1306 | } |
1255 | |
1307 | |
1256 | connection::connection (struct vpn *vpn, conf_node *conf) |
1308 | connection::connection (struct vpn *vpn, conf_node *conf) |
1257 | : vpn(vpn), conf(conf) |
1309 | : vpn(vpn), conf(conf), |
1258 | , rekey (this, &connection::rekey_cb) |
|
|
1259 | , keepalive (this, &connection::keepalive_cb) |
|
|
1260 | , establish_connection (this, &connection::establish_connection_cb) |
|
|
1261 | #if ENABLE_DNS |
1310 | #if ENABLE_DNS |
1262 | , dns (0) |
1311 | dns (0), |
1263 | #endif |
1312 | #endif |
|
|
1313 | data_queue(conf->max_ttl, conf->max_queue), |
|
|
1314 | vpn_queue(conf->max_ttl, conf->max_queue) |
1264 | { |
1315 | { |
|
|
1316 | rekey .set<connection, &connection::rekey_cb > (this); |
|
|
1317 | keepalive .set<connection, &connection::keepalive_cb > (this); |
|
|
1318 | establish_connection.set<connection, &connection::establish_connection_cb> (this); |
|
|
1319 | |
1265 | octx = ictx = 0; |
1320 | octx = ictx = 0; |
1266 | retry_cnt = 0; |
1321 | retry_cnt = 0; |
1267 | |
1322 | |
1268 | if (!conf->protocols) // make sure some protocol is enabled |
1323 | if (!conf->protocols) // make sure some protocol is enabled |
1269 | conf->protocols = PROT_UDPv4; |
1324 | conf->protocols = PROT_UDPv4; |
1270 | |
1325 | |
1271 | connectmode = conf_node::C_ALWAYS; // initial setting |
1326 | connectmode = conf->connectmode; |
|
|
1327 | |
|
|
1328 | // queue a dummy packet to force an initial connection attempt |
|
|
1329 | if (connectmode != conf_node::C_ALWAYS && connectmode != conf_node::C_DISABLED) |
|
|
1330 | { |
|
|
1331 | net_packet *p = new net_packet; |
|
|
1332 | p->len = 0; |
|
|
1333 | vpn_queue.put (p); |
|
|
1334 | } |
|
|
1335 | |
1272 | reset_connection (); |
1336 | reset_connection (); |
1273 | } |
1337 | } |
1274 | |
1338 | |
1275 | connection::~connection () |
1339 | connection::~connection () |
1276 | { |
1340 | { |