ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/vpn_dns.C
(Generate patch)

Comparing gvpe/src/vpn_dns.C (file contents):
Revision 1.30 by pcg, Mon Mar 14 17:40:01 2005 UTC vs.
Revision 1.46 by pcg, Thu Dec 6 00:35:29 2007 UTC

14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with gvpe; if not, write to the Free Software 18 along with gvpe; if not, write to the Free Software
19 Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/ 20*/
21
22// TODO: EDNS0 option to increase dns mtu?
23// TODO: re-write dns packet parsing/creation using a safe mem-buffer
24// to ensure no buffer overflows or similar problems.
21 25
22#include "config.h" 26#include "config.h"
23 27
24#if ENABLE_DNS 28#if ENABLE_DNS
25 29
38#include <unistd.h> 42#include <unistd.h>
39#include <fcntl.h> 43#include <fcntl.h>
40 44
41#include <map> 45#include <map>
42 46
47#include <cstdio> /* bug in libgmp: gmp.h relies on cstdio being included */
43#include <gmp.h> 48#include <gmp.h>
44 49
45#include "netcompat.h" 50#include "netcompat.h"
46 51
47#include "vpn.h" 52#include "vpn.h"
48 53
49#define MAX_POLL_INTERVAL 5. // how often to poll minimally when the server has no data 54#define MAX_POLL_INTERVAL 5. // how often to poll minimally when the server has no data
50#define ACTIVITY_INTERVAL 5. 55#define ACTIVITY_INTERVAL 5.
51 56
52#define INITIAL_TIMEOUT 0.1 // retry timeouts 57#define INITIAL_TIMEOUT 0.1 // retry timeouts
53#define INITIAL_SYN_TIMEOUT 10. // retry timeout for initial syn 58#define INITIAL_SYN_TIMEOUT 2. // retry timeout for initial syn
54 59
55#define MIN_SEND_INTERVAL 0.001 // wait at least this time between sending requests
56#define MAX_SEND_INTERVAL 2. // optimistic? 60#define MAX_SEND_INTERVAL 2. // optimistic?
57 61
58#define LATENCY_FACTOR 0.5 // RTT * LATENCY_FACTOR == sending rate
59#define MAX_OUTSTANDING 2 // max. outstanding requests
60#define MAX_WINDOW 1000 // max. for MAX_OUTSTANDING, and backlog 62#define MAX_WINDOW 1000 // max. for MAX_OUTSTANDING, and backlog
61#define MAX_BACKLOG (100*1024) // size of gvpe protocol backlog (bytes), must be > MAXSIZE 63#define MAX_BACKLOG (64*1024) // size of gvpe protocol backlog (bytes), must be > MAXSIZE
62 64
63#define MAX_DOMAIN_SIZE 240 // 255 is legal limit, but bind doesn't compress well 65#define MAX_DOMAIN_SIZE 240 // 255 is legal limit, but bind doesn't compress well
64// 240 leaves about 4 bytes of server reply data 66// 240 leaves about 4 bytes of server reply data
65// every two request bytes less give room for one reply byte 67// every request byte less give room for two reply bytes
66 68
67#define SEQNO_MASK 0x3fff 69#define SEQNO_MASK 0x3fff
68#define SEQNO_EQ(a,b) ( 0 == ( ((a) ^ (b)) & SEQNO_MASK) ) 70#define SEQNO_EQ(a,b) ( 0 == ( ((a) ^ (b)) & SEQNO_MASK) )
69 71
70#define MAX_LBL_SIZE 63 72#define MAX_LBL_SIZE 63
460 r4 = r5 = r6 = r7 = 0; 462 r4 = r5 = r6 = r7 = 0;
461} 463}
462 464
463bool dns_cfg::valid () 465bool dns_cfg::valid ()
464{ 466{
467 // although the protocol itself allows for some configurability,
468 // only the following encoding/decoding settings are implemented.
465 return id1 == 'G' 469 return id1 == 'G'
466 && id2 == 'V' 470 && id2 == 'V'
467 && id3 == 'P' 471 && id3 == 'P'
468 && id4 == 'E' 472 && id4 == 'E'
469 && seq_cdc == 26 473 && seq_cdc == 26
553 double min_latency; 557 double min_latency;
554 double poll_interval, send_interval; 558 double poll_interval, send_interval;
555 559
556 vector<dns_rcv *> rcvpq; 560 vector<dns_rcv *> rcvpq;
557 561
558 byte_stream rcvdq; int rcvseq; 562 byte_stream rcvdq; int rcvseq; int repseq;
559 byte_stream snddq; int sndseq; 563 byte_stream snddq; int sndseq;
560 564
561 void time_cb (time_watcher &w); time_watcher tw; 565 inline void time_cb (ev::timer &w, int revents); ev::timer tw;
562 void receive_rep (dns_rcv *r); 566 void receive_rep (dns_rcv *r);
563 567
564 dns_connection (connection *c); 568 dns_connection (connection *c);
565 ~dns_connection (); 569 ~dns_connection ();
566}; 570};
585: dns (dns) 589: dns (dns)
586{ 590{
587 timeout = 0; 591 timeout = 0;
588 retry = 0; 592 retry = 0;
589 seqno = 0; 593 seqno = 0;
590 sent = NOW; 594 sent = ev_now ();
591 stdhdr = false; 595 stdhdr = false;
592 596
593 pkt = new dns_packet; 597 pkt = new dns_packet;
594 598
595 pkt->id = next_id (); 599 pkt->id = next_id ();
626void dns_snd::gen_stream_req (int seqno, byte_stream &stream) 630void dns_snd::gen_stream_req (int seqno, byte_stream &stream)
627{ 631{
628 stdhdr = true; 632 stdhdr = true;
629 this->seqno = seqno; 633 this->seqno = seqno;
630 634
631 timeout = NOW + INITIAL_TIMEOUT; 635 timeout = ev_now () + INITIAL_TIMEOUT;
632 636
633 pkt->flags = htons (DEFAULT_CLIENT_FLAGS); 637 pkt->flags = htons (DEFAULT_CLIENT_FLAGS);
634 pkt->qdcount = htons (1); 638 pkt->qdcount = htons (1);
635 639
636 int offs = 6*2; 640 int offs = 6*2;
671 pkt->len = offs; 675 pkt->len = offs;
672} 676}
673 677
674void dns_snd::gen_syn_req () 678void dns_snd::gen_syn_req ()
675{ 679{
676 timeout = NOW + INITIAL_SYN_TIMEOUT; 680 timeout = ev_now () + INITIAL_SYN_TIMEOUT;
677 681
678 pkt->flags = htons (DEFAULT_CLIENT_FLAGS); 682 pkt->flags = htons (DEFAULT_CLIENT_FLAGS);
679 pkt->qdcount = htons (1); 683 pkt->qdcount = htons (1);
680 684
681 int offs = 6 * 2; 685 int offs = 6 * 2;
720///////////////////////////////////////////////////////////////////////////// 724/////////////////////////////////////////////////////////////////////////////
721 725
722dns_connection::dns_connection (connection *c) 726dns_connection::dns_connection (connection *c)
723: c (c) 727: c (c)
724, rcvdq (MAX_BACKLOG * 2) 728, rcvdq (MAX_BACKLOG * 2)
725, snddq (MAX_BACKLOG * 2) 729, snddq (MAX_BACKLOG)
726, tw (this, &dns_connection::time_cb)
727{ 730{
731 tw.set<dns_connection, &dns_connection::time_cb> (this);
732
728 vpn = c->vpn; 733 vpn = c->vpn;
729 734
730 established = false; 735 established = false;
731 736
732 rcvseq = sndseq = 0; 737 rcvseq = repseq = sndseq = 0;
733 738
734 last_sent = last_received = 0; 739 last_sent = last_received = 0;
735 poll_interval = 0.5; // starting here 740 poll_interval = 0.5; // starting here
736 send_interval = 0.5; // starting rate 741 send_interval = 0.5; // starting rate
737 min_latency = INITIAL_TIMEOUT; 742 min_latency = INITIAL_TIMEOUT;
747 752
748void dns_connection::receive_rep (dns_rcv *r) 753void dns_connection::receive_rep (dns_rcv *r)
749{ 754{
750 if (r->datalen) 755 if (r->datalen)
751 { 756 {
752 last_received = NOW; 757 last_received = ev_now ();
753 tw.trigger (); 758 tw ();
754 759
755 poll_interval = send_interval; 760 poll_interval = send_interval;
756 } 761 }
757 else 762 else
758 { 763 {
768 773
769 // find next packet 774 // find next packet
770 for (vector<dns_rcv *>::iterator i = rcvpq.end (); i-- != rcvpq.begin (); ) 775 for (vector<dns_rcv *>::iterator i = rcvpq.end (); i-- != rcvpq.begin (); )
771 if (SEQNO_EQ (rcvseq, (*i)->seqno)) 776 if (SEQNO_EQ (rcvseq, (*i)->seqno))
772 { 777 {
778 //printf ("seqno eq %x %x\n", rcvseq, (*i)->seqno);//D
773 // enter the packet into our input stream 779 // enter the packet into our input stream
774 r = *i; 780 r = *i;
775 781
776 // remove the oldest packet, look forward, as it's oldest first 782 // remove the oldest packet, look forward, as it's oldest first
777 for (vector<dns_rcv *>::iterator j = rcvpq.begin (); j != rcvpq.end (); ++j) 783 for (vector<dns_rcv *>::iterator j = rcvpq.begin (); j != rcvpq.end (); ++j)
778 if (SEQNO_EQ ((*j)->seqno, rcvseq - MAX_WINDOW)) 784 if (SEQNO_EQ ((*j)->seqno, rcvseq - MAX_WINDOW))
779 { 785 {
786 //printf ("seqno RR %x %x\n", (*j)->seqno, rcvseq - MAX_WINDOW);//D
780 delete *j; 787 delete *j;
781 rcvpq.erase (j); 788 rcvpq.erase (j);
782 break; 789 break;
783 } 790 }
784 791
791 } 798 }
792 799
793 while (vpn_packet *pkt = rcvdq.get ()) 800 while (vpn_packet *pkt = rcvdq.get ())
794 { 801 {
795 sockinfo si; 802 sockinfo si;
796 si.host = 0x01010101; si.port = htons (c->conf->id); si.prot = PROT_DNSv4; 803 si.host = htonl (c->conf->id); si.port = 0; si.prot = PROT_DNSv4;
797 804
798 vpn->recv_vpn_packet (pkt, si); 805 vpn->recv_vpn_packet (pkt, si);
799 806
800 delete pkt; 807 delete pkt;
801 } 808 }
855 if (0 < client && client <= conns.size ()) 862 if (0 < client && client <= conns.size ())
856 { 863 {
857 connection *c = conns [client - 1]; 864 connection *c = conns [client - 1];
858 dns_connection *dns = c->dns; 865 dns_connection *dns = c->dns;
859 dns_rcv *rcv; 866 dns_rcv *rcv;
860 bool in_seq;
861 867
862 if (dns) 868 if (dns)
863 { 869 {
864 for (vector<dns_rcv *>::iterator i = dns->rcvpq.end (); i-- != dns->rcvpq.begin (); ) 870 for (vector<dns_rcv *>::iterator i = dns->rcvpq.end (); i-- != dns->rcvpq.begin (); )
865 if (SEQNO_EQ ((*i)->seqno, seqno)) 871 if (SEQNO_EQ ((*i)->seqno, seqno))
876 memcpy (pkt.at (0), r->pkt->at (0), offs = r->pkt->len); 882 memcpy (pkt.at (0), r->pkt->at (0), offs = r->pkt->len);
877 883
878 goto duplicate_request; 884 goto duplicate_request;
879 } 885 }
880 886
881 in_seq = dns->rcvseq == seqno;
882
883 // new packet, queue 887 // new packet, queue
884 rcv = new dns_rcv (seqno, data, datalen); 888 rcv = new dns_rcv (seqno, data, datalen);
885 dns->receive_rep (rcv); 889 dns->receive_rep (rcv);
886 } 890 }
887 891
904 dlen -= qlen; 908 dlen -= qlen;
905 909
906 // only put data into in-order sequence packets, if 910 // only put data into in-order sequence packets, if
907 // we receive out-of-order packets we generate empty 911 // we receive out-of-order packets we generate empty
908 // replies 912 // replies
909 while (dlen > 1 && !dns->snddq.empty () && in_seq) 913 //printf ("%d - %d & %x (=%d) < %d\n", seqno, dns->repseq, SEQNO_MASK, (seqno - dns->repseq) & SEQNO_MASK, MAX_WINDOW);//D
914 if (((seqno - dns->repseq) & SEQNO_MASK) <= MAX_WINDOW)
910 { 915 {
916 dns->repseq = seqno;
917
918 while (dlen > 1 && !dns->snddq.empty ())
919 {
911 int txtlen = dlen <= 255 ? dlen - 1 : 255; 920 int txtlen = dlen <= 255 ? dlen - 1 : 255;
912 921
913 if (txtlen > dns->snddq.size ()) 922 if (txtlen > dns->snddq.size ())
914 txtlen = dns->snddq.size (); 923 txtlen = dns->snddq.size ();
915 924
916 pkt[offs++] = txtlen; 925 pkt[offs++] = txtlen;
917 memcpy (pkt.at (offs), dns->snddq.begin (), txtlen); 926 memcpy (pkt.at (offs), dns->snddq.begin (), txtlen);
918 offs += txtlen; 927 offs += txtlen;
919 dns->snddq.remove (txtlen); 928 dns->snddq.remove (txtlen);
920 929
921 dlen -= txtlen + 1; 930 dlen -= txtlen + 1;
931 }
922 } 932 }
923 933
924 // avoid empty TXT rdata 934 // avoid completely empty TXT rdata
925 if (offs == rdlen_offs) 935 if (offs == rdlen_offs)
926 pkt[offs++] = 0; 936 pkt[offs++] = 0;
927 937
928 slog (L_NOISE, "DNS: snddq %d", dns->snddq.size ()); 938 slog (L_NOISE, "DNS: snddq %d", dns->snddq.size ());
929 } 939 }
1009 { 1019 {
1010 dns_connection *dns = (*i)->dns; 1020 dns_connection *dns = (*i)->dns;
1011 connection *c = dns->c; 1021 connection *c = dns->c;
1012 int seqno = (*i)->seqno; 1022 int seqno = (*i)->seqno;
1013 u8 data[MAXSIZE], *datap = data; 1023 u8 data[MAXSIZE], *datap = data;
1024 //printf ("rcv pkt %x\n", seqno);//D
1014 1025
1015 if ((*i)->retry) 1026 if ((*i)->retry)
1016 { 1027 {
1017 dns->send_interval *= 1.01; 1028 dns->send_interval *= 1.01;
1018 if (dns->send_interval > MAX_SEND_INTERVAL) 1029 if (dns->send_interval > MAX_SEND_INTERVAL)
1023#if 0 1034#if 0
1024 dns->send_interval *= 0.999; 1035 dns->send_interval *= 0.999;
1025#endif 1036#endif
1026 // the latency surely puts an upper bound on 1037 // the latency surely puts an upper bound on
1027 // the minimum send interval 1038 // the minimum send interval
1028 double latency = NOW - (*i)->sent; 1039 double latency = ev_now () - (*i)->sent;
1029 1040
1030 if (latency < dns->min_latency) 1041 if (latency < dns->min_latency)
1031 dns->min_latency = latency; 1042 dns->min_latency = latency;
1032 1043
1033 if (dns->send_interval > dns->min_latency * LATENCY_FACTOR) 1044 if (dns->send_interval > dns->min_latency * conf.dns_overlap_factor)
1034 dns->send_interval = dns->min_latency * LATENCY_FACTOR; 1045 dns->send_interval = dns->min_latency * conf.dns_overlap_factor;
1035 1046
1036 if (dns->send_interval < MIN_SEND_INTERVAL) 1047 if (dns->send_interval < conf.dns_send_interval)
1037 dns->send_interval = MIN_SEND_INTERVAL; 1048 dns->send_interval = conf.dns_send_interval;
1038 } 1049 }
1039 1050
1040 delete *i; 1051 delete *i;
1041 dns_sndpq.erase (i); 1052 dns_sndpq.erase (i);
1042 1053
1147 break; 1158 break;
1148 } 1159 }
1149} 1160}
1150 1161
1151void 1162void
1152vpn::dnsv4_ev (io_watcher &w, short revents) 1163vpn::dnsv4_ev (ev::io &w, int revents)
1153{ 1164{
1154 if (revents & EVENT_READ) 1165 if (revents & EV_READ)
1155 { 1166 {
1156 dns_packet *pkt = new dns_packet; 1167 dns_packet *pkt = new dns_packet;
1157 struct sockaddr_in sa; 1168 struct sockaddr_in sa;
1158 socklen_t sa_len = sizeof (sa); 1169 socklen_t sa_len = sizeof (sa);
1159 1170
1175} 1186}
1176 1187
1177bool 1188bool
1178vpn::send_dnsv4_packet (vpn_packet *pkt, const sockinfo &si, int tos) 1189vpn::send_dnsv4_packet (vpn_packet *pkt, const sockinfo &si, int tos)
1179{ 1190{
1180 int client = ntohs (si.port); 1191 int client = ntohl (si.host);
1181 1192
1182 assert (0 < client && client <= conns.size ()); 1193 assert (0 < client && client <= conns.size ());
1183 1194
1184 connection *c = conns [client - 1]; 1195 connection *c = conns [client - 1];
1185 1196
1186 if (!c->dns) 1197 if (!c->dns)
1187 c->dns = new dns_connection (c); 1198 c->dns = new dns_connection (c);
1188 1199
1189 if (!c->dns->snddq.put (pkt)) 1200 if (c->dns->snddq.put (pkt))
1190 return false;
1191
1192 c->dns->tw.trigger (); 1201 c->dns->tw ();
1193 1202
1203 // always return true even if the buffer overflows
1194 return true; 1204 return true;
1195} 1205}
1196 1206
1197void 1207void
1198connection::dnsv4_reset_connection () 1208connection::dnsv4_reset_connection ()
1201} 1211}
1202 1212
1203#define NEXT(w) do { if (next > (w)) next = w; } while (0) 1213#define NEXT(w) do { if (next > (w)) next = w; } while (0)
1204 1214
1205void 1215void
1206dns_connection::time_cb (time_watcher &w) 1216dns_connection::time_cb (ev::timer &w, int revents)
1207{ 1217{
1208 // servers have to be polled 1218 // servers have to be polled
1209 if (THISNODE->dns_port) 1219 if (THISNODE->dns_port)
1210 return; 1220 return;
1211 1221
1212 // check for timeouts and (re)transmit 1222 // check for timeouts and (re)transmit
1213 tstamp next = NOW + poll_interval; 1223 tstamp next = ev::now () + poll_interval;
1214 dns_snd *send = 0; 1224 dns_snd *send = 0;
1215 1225
1216 for (vector<dns_snd *>::iterator i = vpn->dns_sndpq.begin (); 1226 for (vector<dns_snd *>::iterator i = vpn->dns_sndpq.begin ();
1217 i != vpn->dns_sndpq.end (); 1227 i != vpn->dns_sndpq.end ();
1218 ++i) 1228 ++i)
1219 { 1229 {
1220 dns_snd *r = *i; 1230 dns_snd *r = *i;
1221 1231
1222 if (r->timeout <= NOW) 1232 if (r->timeout <= ev_now ())
1223 { 1233 {
1224 if (!send) 1234 if (!send)
1225 { 1235 {
1226 send = r; 1236 send = r;
1227 1237
1228 r->retry++; 1238 r->retry++;
1229 r->timeout = NOW + (r->retry * min_latency * 8.); 1239 r->timeout = ev_now () + (r->retry * min_latency * conf.dns_timeout_factor);
1240 //printf ("RETRY %x (%d, %f)\n", r->seqno, r->retry, r->timeout - ev_now ());//D
1230 1241
1231 // the following code changes the query section a bit, forcing 1242 // the following code changes the query section a bit, forcing
1232 // the forwarder to generate a new request 1243 // the forwarder to generate a new request
1233 if (r->stdhdr) 1244 if (r->stdhdr)
1234 {
1235 //printf ("reencoded header for ID %d retry %d:%d:%d (%p)\n", htons (r->pkt->id), THISNODE->id, r->seqno, r->retry);
1236 //encode_header ((char *)r->pkt->at (6 * 2 + 1), THISNODE->id, r->seqno, r->retry); 1245 encode_header ((char *)r->pkt->at (6 * 2 + 1), THISNODE->id, r->seqno, r->retry);
1237 }
1238 } 1246 }
1239 } 1247 }
1240 else 1248 else
1241 NEXT (r->timeout); 1249 NEXT (r->timeout);
1242 } 1250 }
1253 1261
1254 cfg.reset (THISNODE->id); 1262 cfg.reset (THISNODE->id);
1255 send->gen_syn_req (); 1263 send->gen_syn_req ();
1256 } 1264 }
1257 } 1265 }
1258 else if (vpn->dns_sndpq.size () < MAX_OUTSTANDING 1266 else if (vpn->dns_sndpq.size () < conf.dns_max_outstanding
1259 && !SEQNO_EQ (rcvseq, sndseq - (MAX_WINDOW - 1))) 1267 && !SEQNO_EQ (rcvseq, sndseq - (MAX_WINDOW - 1)))
1260 { 1268 {
1261 if (last_sent + send_interval <= NOW) 1269 if (last_sent + send_interval <= ev_now ())
1262 { 1270 {
1263 //printf ("sending data request etc.\n"); //D 1271 //printf ("sending data request etc.\n"); //D
1264 if (!snddq.empty () || last_received + 1. > NOW) 1272 if (!snddq.empty () || last_received + 1. > ev_now ())
1265 { 1273 {
1266 poll_interval = send_interval; 1274 poll_interval = send_interval;
1267 NEXT (NOW + send_interval); 1275 NEXT (ev_now () + send_interval);
1268 } 1276 }
1269 1277
1270 send = new dns_snd (this); 1278 send = new dns_snd (this);
1271 send->gen_stream_req (sndseq, snddq); 1279 send->gen_stream_req (sndseq, snddq);
1272 send->timeout = NOW + min_latency * 8.; 1280 send->timeout = ev_now () + min_latency * conf.dns_timeout_factor;
1281 //printf ("SEND %x (%f)\n", send->seqno, send->timeout - ev_now (), min_latency, conf.dns_timeout_factor);//D
1273 1282
1274 sndseq = (sndseq + 1) & SEQNO_MASK; 1283 sndseq = (sndseq + 1) & SEQNO_MASK;
1275 } 1284 }
1276 else 1285 else
1277 NEXT (last_sent + send_interval); 1286 NEXT (last_sent + send_interval);
1281 vpn->dns_sndpq.push_back (send); 1290 vpn->dns_sndpq.push_back (send);
1282 } 1291 }
1283 1292
1284 if (send) 1293 if (send)
1285 { 1294 {
1286 last_sent = NOW; 1295 last_sent = ev_now ();
1287 sendto (vpn->dnsv4_fd, 1296 sendto (vpn->dnsv4_fd,
1288 send->pkt->at (0), send->pkt->len, 0, 1297 send->pkt->at (0), send->pkt->len, 0,
1289 vpn->dns_forwarder.sav4 (), vpn->dns_forwarder.salenv4 ()); 1298 vpn->dns_forwarder.sav4 (), vpn->dns_forwarder.salenv4 ());
1290 } 1299 }
1291 1300
1292 slog (L_NOISE, "DNS: pi %f si %f N %f (%d:%d %d)", 1301 slog (L_NOISE, "DNS: pi %f si %f N %f (%d:%d %d)",
1293 poll_interval, send_interval, next - NOW, 1302 poll_interval, send_interval, next - ev_now (),
1294 vpn->dns_sndpq.size (), snddq.size (), 1303 vpn->dns_sndpq.size (), snddq.size (),
1295 rcvpq.size ()); 1304 rcvpq.size ());
1296 1305
1297 // TODO: no idea when this happens, but when next < NOW, we have a problem 1306 // TODO: no idea when this happens, but when next < ev_now (), we have a problem
1307 // doesn't seem to happen anymore
1298 if (next < NOW + 0.001) 1308 if (next < ev_now () + 0.001)
1299 next = NOW + 0.1; 1309 next = ev_now () + 0.1;
1300 1310
1301 w.start (next); 1311 w.start (next - ev_now ());
1302} 1312}
1303 1313
1304#endif 1314#endif
1305 1315

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines