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