CHANGELOG revision 90fe3b25
12019-02-15
2    - 1.19.4
3    - [BUGFIX] Check buffer bounds when looking up version in 0-RTT blob.
4    - [BUGFIX] http_client: don't fetch 0-rtt info if handshake failed.
5    - Log number of pacer calls at DEBUG, rather than NOTICE, level.
6
72019-02-18
8    - 1.19.3
9    - [BUGFIX] Q044: don't encode packet number in 6 bytes.  Six-byte
10      packet number encoding does not exist in Q044.  This fixes a
11      regression introduced in '[BUGFIX] Buffered packets can contain
12      ACK frames' -- we need to keep QUIC version in mind when selecting
13      the longest possible packet number encoding used for the buffered
14      packet that carries the ACK.
15    - [BUGFIX] Do not increase CWND when timeout occurs.
16    - http_client: support setting handshake timeout on command line.
17      Use -o handshake_to=timeout.
18    - http_client: use -k to connect UDP socket to pick up ICMP errors.
19    - http_client: allow pathless mode, when only handshake is performed
20      without issuing any requests.  This can be done by simply not
21      specifying a -p flag on the command line.
22
232019-02-11
24    - 1.19.2
25    - [BUGFIX] Begin negotiation with version provided in 0-RTT info.
26    - [BUGFIX] Version checking in zero_rtt deserialize function.
27
282019-02-04
29    - 1.19.1
30    - [BUGFIX] Fix Windows build.
31
322019-02-04
33    - 1.19.0
34    - [FEATURE, API Change] 0-RTT support.  Add function to export 0-RTT
35      information; it can be supplied to a subsequent connect() call.
36    - [FEATURE] Add -0 flag to http_client to exercise 0-RTT support.
37    - [BUGFIX] Resuscitate the Windows build.
38    - [BUGFIX] Send HTTP settings (max header list size) if necessary.
39    - [BUGFIX] Buffered packets can contain ACK frames.
40    - [BUGFIX] Make packet writeable once all STREAM frames are elided.
41    - [BUGFIX] Fix potential null dereference when realloc fails.
42    - cmake: simplify build configuration.
43
442019-01-28
45    - 1.18.0
46    - [API Change] Can specify clock granularity in engine settings.
47    - [BUGFIX] Pacer uses fixed clock granularity.  Since the change on
48      2018-04-09, it is not necessary to try to approximate the next tick
49      time in the pacer: it can use fix clock granularity specified by
50      the user.
51    - [BUGFIX] Do not tick constantly before handshake is done.
52    - [BUGFIX] Do not exit tick prematurely: reuse packet with ACK.  Even
53      if we cannot allocate *more* packets, we could still be able to write
54      to one already allocated.
55    - [BUGFIX] Do not schedule pacer if there are no lost packets.
56
572019-01-17
58    - 1.17.15
59    - [BUGFIX] http_client: make sure only one read per on_read() callback
60      is performed in the header conversion bypass (-B) mode.
61    - http_client: with -E, assign random priority when stream is created.
62    - [OPTIMIZATION] On immediate write, place an ACK frame into the first
63      buffered packet if an ACK is queued.  This reduces the number of
64      standalone ACK packets.
65    - [OPTIMIZATION] Allow placing more than one STREAM frame from the same
66      stream into an outgoing packet.  This change minimizes the number of
67      buffered packets required to store several small HTTP messages by
68      virtue of allowing more than one STREAM frame from HEADERS stream in
69      the same packet.
70    - [OPTIMIZATION] Flush headers when writing to buffered packets.  This
71      causes the headers to be written to the same buffered packet queue,
72      thereby improving packet utilization, especially for small HTTP
73      messages.
74
752019-01-16
76    - 1.17.14
77    - [FEATURE] http_client can now collect stats: time to connect, TTFB,
78      time to download, requests per seconds, and bandwidth.  See -t flag.
79    - [BUGFIX] http_client: -B, -K, and -r can be used at the same time.
80    - [BUGFIX] http_client: do not display cert chain before each request.
81      Now this is only done once per connection, if the handshake is
82      successful and -a option is given.
83    - [BUGFIX] Do not wait to dispatch on_close() after reading.  If a
84      stream is scheduled to be closed after on_read() callback returns,
85      close it immediately instead of waiting until the end of the tick.
86      If client creates new request from on_close() event, they will be
87      processed in the same tick instead of waiting for the next one.
88    - [BUGFIX] HEADERS stream is critical: always treat it with highest
89      priority.
90
912019-01-10
92    - 1.17.12
93    - [FEATURE] http_client can now issue parallel requests in the context
94      of a single connection.  See -w option.
95
962019-01-03
97    - 1.17.11
98    - Fix strict aliasing warning in optimized compilation.
99
1002018-12-27
101    - 1.17.10
102    - Fix the example program to be able to use parallel connections
103      again.  (See the -n argument.)
104
1052018-12-18
106    - 1.17.9
107    - [BUGFIX] Engine: reduce minimum batch size from 256 to 4
108
1092018-12-10
110    - 1.17.8
111    - [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux
112
1132018-12-03
114    - 1.17.7
115    - [BUGFIX] Do not unset PING alarm before ringing expired alarms.
116      This prevented PING from ever being sent.
117
1182018-11-29
119    - 1.17.6
120    - Add failsafe: resume sending packets after some time
121
122      The change puts a 1-second limit on the amount of time the engine
123      will not send packets after some packets are delayed.  This makes
124      the library robust in case the user does not unblock the engine
125      explicitly using lsquic_engine_send_unsent_packets() call.
126
127    - [BUGFIX] Handle corner cases in send controller when packets are
128      a) delayed or b) dropped during repackaging.
129    - [BUGFIX] Memory leak: destroy buffered packets during controller
130      cleanup.
131
1322018-11-16
133    - 1.17.3
134    - [BUGFIX] Do not send STOP_WAITING frames when using Q044
135
1362018-10-19
137    - 1.17.2
138    - [BUGFIX] Memory leak in test_frame_rw unit test.
139    - [BUGFIX] Parsing packets with short IETF header: do not overwrite
140      flags.  (Only a problem in unit tests -- benign otherwise.)
141
1422018-10-16
143    - 1.17.0
144    - [API Change] Packet out Memory Interface (PMI) update:
145      - Split PMI pool return into pmi_release and pmi_return
146      - PMI callbacks take peer_ctx and is_ipv6 arguments
147    - [BUGFIX] Fix use-after-free when certificate is updated
148    - Silence gcc warning in optimized mode by performing useless
149      initialization
150    - cmake: use the standard variable CMAKE_BUILD_TYPE instead of
151      DEVEL_MODE
152
1532018-10-03
154    - 1.16.0
155    - [API Change] Add lsquic_conn_n_avail_streams()
156    - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on
157
1582018-09-27
159    - 1.15.0
160    - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses
161    - [BUGFIX] free uncompressed headers correctly when error occurs
162
1632018-09-12
164    - 1.14.3
165    - [BUGFIX] Do not abort conn on STREAM frame for a reset stream
166    - [BUGFIX] Drop packets that would become empty due to repackaging.
167      Packets on the scheduled queue may be marked for repackaging.
168      Frames such as ACK frame that are never resent are removed from
169      repackaged packets.  We must check that the newly repackaged packet
170      would not be empty.  If it would be, it is destroyed instead and
171      the next packet on the scheduled queue is used.  Note that this
172      change only affects the logic to return the next packet to be sent.
173      Lost packets that are being rescheduled are already processed in
174      this fashion.
175    - Byteswap CID before logging it - this makes it match Chrome CIDs.
176      (Except Q035, which is the last little-endian GQUIC version we
177      support.)
178
1792018-09-06
180    - 1.14.0
181    - [API Change] Disable packet sending if full batch cannot be sent
182      If lsquic_packets_out_f() cannot send the whole batch, disable
183      packet sending until lsquic_engine_send_unsent_packets() is called.
184    - [BUGFIX] Handle case when STREAM frame does not fit.
185    - [BUGFIX] Always allow incoming STREAM frames to overlap.  Peers
186      may send overlapping STREAM frames even if using versions older
187      than Q043.
188    - Custom header set fixes:
189      - set "FIN reached" flag when custom header with FIN flag is
190        claimed;
191      - do not return custom header set for a reset stream.
192
1932018-08-27
194
195    - 1.13.0
196    - [FEATURE, API Change] Add ability to create custom header set
197      objects via callbacks.  This avoids reading and re-parsing
198      headers from the stream.
199
2002018-08-27
201
202    - 1.12.4
203    - Fix memory leak when engine is destroyed
204    - Fix memory leak in http_client
205    - Fix gcc warning in unit tests
206
2072018-08-22
208
209    - 1.12.3
210    - [BUGFIX] Fix duplicate STREAM frame detection
211
2122018-08-20
213
214    - 1.12.2
215    - [BUGFIX] Update count of scheduled bytes when adjusting size of
216      an already-scheduled packet.
217    - Emit info instead of warning messages when stream is used in
218      unexpected ways.
219
2202018-08-17
221
222    - 1.12.0
223    - [FEATURE, API Change] Add support for certificate verification
224
2252018-08-16
226
227    - 1.11.1
228    - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code
229
2302018-08-15
231
232    - 1.11.0
233    - [FEATURE] Add support for Q044.
234
2352018-08-09
236
237    - 1.10.2
238    - [BUGFIX] Don't go over limit when creating delayed streams
239
2402018-07-10
241
242    - 1.10.1
243    - [BUGFIX]  process connections after each batch of packets is read
244      This avoids a problem of accumulating a very large list of packets
245      (possible when speeds are high and socket's receive buffer is large)
246      and processing it all at once.
247    - If glibc is older than 2.17, link with rt.  This is necessary for
248      clock_getres(2).
249    - Add version macros to lsquic.h; remove unnecessary includes.
250
2512018-06-13
252
253    - [BUGFIX] allow multiple parallel connections by default
254
255      Use the original method of tracking connections by CIDs by default.
256      If zero-sized CID support is turned on, connections are tracked by
257      the address.  A new connection is not created if another connection
258      is using the same network address
259
2602018-05-30
261
262    - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets
263
2642018-05-24
265
266    - Close connection properly when packet encryption fails
267
2682018-05-23
269
270    - [BUGFIX] Do not produce packet sequence gaps due to delayed packets
271
2722018-05-21
273
274    - [API Change] Add optional callback to call when handshake is done
275    - [API Change, BUGFIX] After send failure, wait until transport available
276
2772018-05-18
278
279    - [API] Expose useful lsquic_ver2str[] in lsquic.h
280    - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision
281    - Improve checks of number of incoming streams limit and associated
282      error reporting.
283    - [BUGFIX] Command-line option `-6` now works correctly.
284
2852018-05-16
286
287    - [FEATURE] DNS resolution
288    - [BUGFIX] Frame insertion mis-ID as overlap instead of dup
289    - http_client: fix priority range generated by -E flag
290
2912018-05-09
292
293    - [FEATURE] Add support for Q043.
294    - Support for versions Q037, Q038, Q041, and Q042 has been removed.
295    - Fix typo in debug message.
296    - Fix code indentation.
297    - Add /* fallthru */ comment to stop newer gcc from complaining.
298    - Logger: fix compilation of optimized Windows build.
299
3002018-05-04
301
302    - [FEATURE] Add support for Q042.
303    - Remove comment: MSPC is obsolete (no code changes)
304    - Prog: use lsquic_str2ver() when processing -o version flag
305    - Remove unused CTIM and SRBF transport parameters
306    - Disable QUIC versions Q037 and Q038 by default
307    - Fix Windows compilation by including compat header file in
308      lshpack.c
309    - Address warnings produced by newer versions of gcc
310    - Future-proof: turn off -Werror
311
3122018-05-02
313
314    - [BUGFIX] Make lsquic_conn_quic_version() available
315    - Switch to using ls-hpack 1.1
316    - [BUGFIX] Do not ignore stream resets after receiving FIN
317
3182018-04-27
319
320    - HPACK: do not allow header block to end with table size update.
321
3222018-04-25
323
324    - [BUGFIX] Do not create gap in sent packnos when squeezing delayed
325      packets.
326    - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes.
327    - [BUGFIX] connections with blocked scheduled packets are not tickable
328      for sending.
329    - [BUGFIX] Conn is tickable if it wants to send a connection-level
330      frame.
331
3322018-04-23
333
334    - Fix busy loop: tickable must make progress.  When connection is
335      self-reporting as tickable, it must make progress when ticked.  There
336      are two issues:
337        1. If there are buffered packets, the connection is only tickable if
338           they can be sent out.
339        2. A connection is tickable if there are streams on the servicing
340           queue.  When the tick occurs, we must service the stream
341           independent of whether any packets are sent.
342    - Fix assertion in pacer which can be incorrect under some
343      conditions.
344    - cmake: do not turn on address sanitizer if in Travis.
345
3462018-04-20
347
348    - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's
349      changes.
350
3512018-04-19
352
353    - [BUGFIX] Add connection to Tickable Queue on stream write
354    - cmake: use MSVC variable instead of trying to detect
355    - engine: improve connection incref/decref logging
356    - stream: don't ignore errors that may occur on triggered flush
357    - connection: remove obsolete method
358    - engine: indicate connection as tickable if previous call went
359      over threshold
360
3612018-04-09
362
363    [API Change, OPTIMIZATION] Only process conns that need to be processed
364
365    The API is simplified: do not expose the user code to several
366    queues.  A "connection queue" is now an internal concept.
367    The user processes connections using the single function
368    lsquic_engine_process_conns().  When this function is called,
369    only those connections are processed that need to be processed.
370    A connection needs to be processed when:
371
372        1. New incoming packets have been fed to the connection.
373        2. User wants to read from a stream that is readable.
374        3. User wants to write to a stream that is writeable.
375        4. There are buffered packets that can be sent out.  (This
376           means that the user wrote to a stream outside of the
377           lsquic library callback.)
378        5. A control frame (such as BLOCKED) needs to be sent out.
379        6. A stream needs to be serviced or delayed stream needs to
380           be created.
381        7. An alarm rings.
382        8. Pacer timer expires.
383
384    To achieve this, the library places the connections into two
385    priority queues (min heaps):
386
387        1. Tickable Queue; and
388        2. Advisory Tick Time queue (ATTQ).
389
390    Each time lsquic_engine_process_conns() is called, the Tickable
391    Queue is emptied.  After the connections have been ticked, they are
392    queried again: if a connection is not being closed, it is placed
393    either in the Tickable Queue if it is ready to be ticked again or
394    it is placed in the Advisory Tick Time Queue.  It is assumed that
395    a connection always has at least one timer set (the idle alarm).
396
397    The connections in the Tickable Queue are arranged in the least
398    recently ticked order.  This lets connections that have been quiet
399    longer to get their packets scheduled first.
400
401    This change means that the library no longer needs to be ticked
402    periodically.  The user code can query the library when is the
403    next tick event and schedule it exactly.  When connections are
404    processed, only the tickable connections are processed, not *all*
405    the connections.  When there are no tick events, it means that no
406    timer event is necessary -- only the file descriptor READ event
407    is active.
408
409    The following are improvements and simplifications that have
410    been triggered:
411
412        - Queue of connections with incoming packets is gone.
413        - "Pending Read/Write Events" Queue is gone (along with its
414          history and progress checks).  This queue has become the
415          Tickable Queue.
416        - The connection hash no longer needs to track the connection
417          insertion order.
418
4192018-04-02
420
421    - [FEATURE] Windows support
422
423    - Reduce stack use -- outgoing packet batch is now allocated on the heap.
424
4252018-03-09
426
427    - [OPTIMIZATION] Merge series of ACKs if possible
428
429      Parsed single-range ACK frames (that is the majority of frames) are
430      saved in the connection and their processing is deferred until the
431      connection is ticked.  If several ACKs come in a series between
432      adjacent ticks, we check whether the latest ACK is a strict superset
433      of the saved ACK.  If it is, the older ACK is not processed.
434
435      If ACK frames can be merged, they are merged and only one of them is
436      either processed or saved.
437
438    - [OPTIMIZATION] Speed up ACK verification by simplifying send history.
439
440      Never generate a gap in the sent packet number sequence.  This reduces
441      the send history to a single number instead of potentially a series of
442      packet ranges and thereby speeds up ACK verification.
443
444      By default, detecting a gap in the send history is not fatal: only a
445      single warning is generated per connection.  The connection can continue
446      to operate even if the ACK verification code is not able to detect some
447      inconsistencies.
448
449    - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct
450
451      The first part of struct lsquic_send_ctl now consists of members that
452      are used in lsquic_send_ctl_got_ack() (in the absense of packet loss,
453      which is the normal case).  To speed up reads and writes, we no longer
454      try to save space by using 8- and 16-bit integers.  Use regular integer
455      width for everything.
456
457    - [OPTIMIZATION] Cache size of sent packet.
458
459    - [OPTIMIZATION] Keep track of the largest ACKed in packet_out
460
461      Instead of parsing our own ACK frames when packet has been acked,
462      use the value saved in the packet_out structure when the ACK frame
463      was generated.
464
465    - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop
466
467    - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed
468
469    - [OPTIMIZATION] Several code-level optimizations to ACK processing.
470
471    - Fix: http_client: fix -I flag; switch assert() to abort()
472
4732018-02-26
474    - [API Change] lsquic_engine_connect() returns pointer to the connection
475      object.
476    - [API Change] Add lsquic_conn_get_engine() to get engine object from
477      connection object.
478    - [API Change] Add lsquic_conn_status() to query connection status.
479    - [API Change] Add add lsquic_conn_set_ctx().
480    - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345
481    - [OPTIMIZATION] Process handshake STREAM frames as soon as packet
482      arrives.
483    - [OPTIMIZATION] Do not compile expensive send controller sanity check
484      by default.
485    - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header.
486    - [OPTIMIZATION] Only make squeeze function call if necessary.
487    - [OPTIMIZATION] Speed up Q039 ACK frame parsing.
488    - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes.
489    - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating.
490    - [OPTIMIZATION] Prefetch next unacked packet when processing ACK.
491    - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are.
492      ordered.
493    - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation
494    - Fix: reset incoming streams that arrive after we send GOAWAY.
495    - Fix: delay client on_new_conn() call until connection is fully set up.
496    - Fixes to buffered packets logic: splitting, STREAM frame elision.
497    - Fix: do not dispatch on_write callback if no packets are available.
498    - Fix WINDOW_UPDATE send and resend logic.
499    - Fix STREAM frame extension code.
500    - Fix: Drop unflushed data when stream is reset.
501    - Switch to tracking CWND using bytes rather than packets.
502    - Fix TCP friendly adjustment in cubic.
503    - Fix: do not generate invalid STOP_WAITING frames during high packet
504      loss.
505    - Pacer fixes.
506
5072017-12-18
508
509    - Fix: better follow cubic curve after idle period
510    - Fix: add missing parts to outgoing packet splitting code
511    - Fix: compilation using gcc 4.8.4
512
5132017-10-31
514
515    - Add APIs.txt -- describes LSQUIC APIs
516
5172017-10-31
518
519    - [API Change] Sendfile-like functionality is gone.  The stream no
520      longer opens files and deals with file descriptors.  (Among other
521      things, this makes the code more portable.)  Three writing functions
522      are provided:
523
524        lsquic_stream_write
525        lsquic_stream_writev
526        lsquic_stream_writef    (NEW)
527
528      lsquic_stream_writef() is given an abstract reader that has function
529      pointers for size() and read() functions which the user can implement.
530      This is the most flexible way.  lsquic_stream_write() and
531      lsquic_stream_writev() are now both implemented as wrappers around
532      lsquic_stream_writef().
533
534    - [OPTIMIZATION] When writing to stream, be it within or without the
535      on_write() callback, place data directly into packet buffer,
536      bypassing auxiliary data structures.  This reduces amount of memory
537      required, for the amount of data that can be written is limited
538      by the congestion window.
539
540      To support writes outside the on_write() callback, we keep N
541      outgoing packet buffers per connection which can be written to
542      by any stream.  One half of these are reserved for the highest
543      priority stream(s), the other half for all other streams.  This way,
544      low-priority streams cannot write instead of high-priority streams
545      and, on the other hand, low-priority streams get a chance to send
546      their packets out.
547
548      The algorithm is as follows:
549
550      - When user writes to stream outside of the callback:
551        - If this is the highest priority stream, place it onto the
552          reserved N/2 queue or fail.
553            (The actual size of this queue is dynamic -- MAX(N/2, CWND) --
554             rather than N/2, allowing high-priority streams to write as
555             much as can be sent.)
556        - If the stream is not the highest priority, try to place the
557          data onto the reserved N/2 queue or fail.
558      - When tick occurs *and* more packets can be scheduled:
559        - Transfer packets from the high N/2 queue to the scheduled
560          queue.
561        - If more scheduling is allowed:
562          - Call on_write callbacks for highest-priority streams,
563            placing resulting packets directly onto the scheduled queue.
564        - If more scheduling is allowed:
565          - Transfer packets from the low N/2 queue to the scheduled
566            queue.
567        - If more scheduling is allowed:
568          - Call on_write callbacks for non-highest-priority streams,
569            placing resulting packets directly onto the scheduled queue
570
571      The number N is currently 20, but it could be varied based on
572      resource usage.
573
574    - If stream is created due to incoming headers, make headers readable
575      from on_new.
576
577    - Outgoing packets are no longer marked non-writeable to prevent placing
578      more than one STREAM frame from the same stream into a single packet.
579      This property is maintained via code flow and an explicit check.
580      Packets for stream data are allocated using a special function.
581
582    - STREAM frame elision is cheaper, as we only perform it if a reset
583      stream has outgoing packets referencing it.
584
585    - lsquic_packet_out_t is smaller, as stream_rec elements are now
586      inside a union.
587
5882017-10-12
589
590    - Do not send RST_STREAM when stream is closed for reading
591    - Raise maximum header size from 4K to 64K
592    - Check header name and value lengths against maximum imposed by HPACK
593    - Fix NULL dereference in stream flow controller
594
5952017-10-09
596
597    - Hide handshake implementation behind a set of function pointers
598    - Use monotonically increasing clock
599    - Make sure that retx delay is not larger than the max of 60 seconds
600
6012017-09-29
602
603    - A few fixes to code and README
604
6052017-09-28
606
607    - Add support for Q041; drop support for Q040
608
6092017-09-27
610
611    - Fix CMakeLists.txt: BoringSSL include and lib was mixed up
612
6132017-09-26
614
615    - Add support for Mac OS
616    - Add support for Raspberry Pi
617    - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly
618
6192017-09-22
620
621    - Initial release
622