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