CHANGELOG revision 10c41073
12020-01-16 2 - 2.8.9 3 - [BUGFIX] Use ls-qpack 0.11.1 4 - [OPTIMIZATION] Generate random bytes in batches. 5 - Change loss_bits transport parameter ID to 0x1057 following 6 latest draft. 7 - Randomize period with which PINGs are sent to elicit ACKs. 8 - Some refactoring and code cleanup. 9 102020-01-14 11 - 2.8.8 12 - [BUGFIX] Invalid read when parsing IETF transport parameters 13 (this was benign). 14 - [OPTIMIZATION] Frame bundling when using buffered packets in 15 IETF QUIC: a) flush QPACK decoder stream and b) include ACKs 16 in opportunistic fashion. 17 - Fix HTTP/3 framing unit test. 18 - Code cleanup. 19 202020-01-09 21 - 2.8.7 22 - [BUGFIX] Initial packet size check for IETF mini conn applies to 23 UDP payload, not QUIC packet. 24 - Support old and new school loss_bits transport parameter. 25 - Use Q run length of 64 as suggested in the loss bits Draft. 26 - Undo square wave count when packet is delayed. 27 - Code cleanup; minor fixes. 28 292020-01-06 30 - 2.8.5 31 - [HTTP3] Verify number of bytes in incoming DATA frames against 32 content-length. 33 - [HTTP3] Stop issuing streams credits if peer stops opening QPACK 34 decoder window. This addresses a potential attack whereby client 35 can cause the server to keep allocating memory. See Security 36 Considerations in the QPACK draft. 37 - [BUGFIX] Mini conn: don't shorten max packet size for Q050 and later. 38 - [BUGFIX] Init IETF connection flow controller using correct setting. 39 - [BUGFIX] Fix unintended sign extension when removing header protection. 40 - Code cleanup and minor fixes. 41 422019-12-30 43 - 2.8.1 44 - [FEATURE] Use occasional packet number gaps to detect optimistic 45 ACK attacks. 46 - [BUGFIX] Q050 client: all packet numbers are in the App PNS. 47 - [OPTIMIZATION] Merge multi-range ACK frames, not just single-range 48 ACK frames. 49 - IETF QUIC: use RTT estimate in ack timeout calculation. 50 - IETF handshake: abort conn when unexpected errors occur. 51 - Use PING rather than MAX_DATA frames to elicit ACKs from peer. 52 - Server: enforce 1200 byte Initial minimum packet size. 53 - [CLEANUP] Remove code to disable gQUIC crypto. 54 - [CLEANUP] Remove n_timestamps from ACK info struct. 55 - Optimize driver: reuse previous ancillary message when possible. 56 572019-12-23 58 - 2.8.0 59 - [FEATURE] Add support for Q050. 60 - [OPTIMIZATION] Reduce mallocs in gQUIC handshake. 61 - [BUGFIX] Disable redo of failed STREAM frame insertion with debug 62 logging. 63 642019-12-18 65 - 2.7.3 66 - [DEBUG] Further dedup next advisory tick messages when reason is 67 the same. 68 - [BUGFIX] Update size of `a` array in TP struct. Fixes (benign) 69 GitHub bug #94. 70 - Use Cubic by default again instead of BBR, as it delivers more 71 consistent performance. 72 732019-12-11 74 - 2.7.2 75 - [BUGFIX] Send controller: update scheduled bytes when DCID length 76 changes (IETF client). 77 - [BUGFIX] Drop alarm check from sanity test. It no longer works now 78 that we use loss chains. 79 - [PORTABILITY] Fix build on Alpine Linux. 80 - [PORTABILITY] Fix build using XCode. 81 - Client initial DCID length: use RAND_bytes() instead of rand(3). 82 - Add unit tests for connection min heap. 83 - [DEBUG] Log CID in gQUIC handshake module 84 - [DEBUG] Turn on extra checks for IETF client send controller. 85 - [DEBUG] Dedup next advisory tick messages when reason is IDLE timer. 86 - [DEBUG] QPACK decoder handler: log header error code. 87 882019-12-05 89 - 2.7.1 90 - [BUGFIX] client: don't call ignore_init() in middle of batch send. 91 ignore_init() makes an assumption that the send controller has access 92 to all outgoing packets. This change wraps a few IETF full connection 93 methods to delay calling ignore_init() until the engine returns all 94 outgoing packets that were batched. 95 - [BUGFIX] set errno to EAGAIN if sendmmsg() can't send all of them. 96 This needs to be done because the value of errno may be lost on 97 some platforms. 98 - [BUGFIX] Typo that set all bits in sm_qflags lead to crashes. 99 - [BUGFIX] Do not cancel header block processing after failure, as 100 QPACK releases the reference in that case. 101 - [CLEANUP] IETF encrypt: replace assert(0) with a warning. 102 - Several small improvements to the test server. 103 1042019-11-27 105 - 2.7.0 106 - [API, FEATURE] Close connection immediately when ea_packets_out() 107 fails with errno != EAGAIN. The API change is that errno is now 108 examined. Make sure to set it if using something other than 109 sendmsg() to send packets. 110 - [CLEANUP] Immediate close logic in IETF full conn. 111 - [CLEANUP] Fix bogus warning about uninitialized `pair' variable. 112 1132019-11-22 114 - 2.6.7 115 - [FEATURE] Implement the QL extension (offered by default). 116 - [BUGFIX] Abort when encountering unexpected HTTP/3 frames. 117 - [BUGFIX] Acknowledge (QPACK) HTTP/3 trailers correctly. 118 - [DEBUG] Turn on debug message for next advisory tick. 119 1202019-11-20 121 - 2.6.6 122 - [BUGFIX] Using HTTP/3 to HTTP/1.x converter. 123 - [BUGFIX] Truncate log messages instead of throwing them away. 124 1252019-11-15 126 - 2.6.5 127 - [BUGFIX] High priority buffered packet queue length. 128 - [BUGFIX] Rain time calculation: max_ack_delay is in milliseconds. 129 1302019-11-12 131 - 2.6.3 132 - [BUGFIX] Close DATA frames with empty payload correctly. 133 1342019-11-11 135 - 2.6.2 136 - [BUGFIX] SCID!=ODCID rule applies to Retry packets, not regular 137 packets. 138 - [BUGFIX] Zero-RTT: BoringSSL no longer flips read/write secrets. 139 - [BUGFIX] Truncate ACK frame rather instead of aborting IETF 140 connection. 141 - [BUGFIX] Client: don't send duplicate reset tokens. 142 - [BUGFIX] Remove invalid assertion in H3 framing code. 143 - Silence a warning in send ctl by restructuring switch() statement. 144 1452019-11-08 146 - 2.6.1 147 - [BUGFIX] set retry token on all resubmitted packets. 148 - Event log: log sent packet flags. In particular, this allows one 149 to see whether token was sent. 150 - Don't migrate client if es_allow_migration is false. 151 1522019-11-07 153 - 2.6.0 154 - [FEATURE] QUIC and HTTP/3 Internet Draft 24 support 155 1562019-11-07 157 - 2.5.2 158 - [BUGFIX] argument order to gQUIC client constructor. Regression 159 introduced in 2.5.0. 160 - [BUGFIX] split buffered packet error recovery: destroy the correct 161 packet. 162 1632019-11-04 164 - 2.5.1 165 - [BUGFIX] Fix double-free when emptying a packet number space. 166 - [BUGFIX] http_server: fix md5sum handler: handle EOF correctly. 167 - [BUGFIX] Use random values in bits 4 and 5 of the first byte of 168 verneg packets (regression introduced in 2.5.0). 169 - [OPTIMIZATION] Don't compile in expensive attq checks by default. 170 - [OPTIMIZATION] http_server: compile regexes only once. 171 1722019-10-31 173 - 2.5.0 174 - [API] lsquic_engine_connect() can now be passed QUIC version to use. 175 - [OPTIMIZATION] Queue opportunistic ACKs if there is data to be sent. 176 - [BUGFIX] Don't evict streams from priority iterator if there is 177 only one queue. 178 - [OPTIMIZATION, BUGFIX] Several other optimizations and bug fixes. 179 - Use ls-qpack v0.10.7. 180 1812019-10-24 182 - 2.4.10 183 - [BUGFIX] IETF QUIC server: fix uninitialized variable use. 184 - [BUGFIX] make sure TLSv1.3 is not disabled in SSL object. 185 - [BUGFIX] Use issuer name and serial number to cache certs (SKID 186 values are not unique). 187 - [BUGFIX] Always set the idle alarm in IETF connection so that it 188 can time out. 189 - Use ls-qpack v0.10.6, as it silences some warnings. 190 1912019-10-21 192 - 2.4.8 193 - [OPTIMIZATION, BUGFIX] Use ls-qpack v0.10.5. 194 1952019-10-15 196 - 2.4.7 197 - Add echo client and server to the distibution. 198 - Add MD5 client and server to the distibution. 199 - Fix http_client: check command-line arguments better, prevent crash. 200 - Fix IETF conn: can_write_ack() should only care about APP PNS. 201 - Client: delay stream creation until handshake succeds. 202 - Reset HTTP stream whose write end is closed prematurely. 203 - Fix tickable(): mirror behavior of tick() wrt buffered packets. 204 - Log reason why engine is tickable. 205 2062019-10-11 207 - 2.4.6 208 - Minor code cleanup and logging improvements. 209 - Server and client programs: include library version (e.g. 2.4.6) 210 into `server' and `user-agent' headers. 211 2122019-10-08 213 - 2.4.5 214 - [OPTIMIZATION]: flush encoder stream only when necessary. 215 - [BUGFIX] Use ls-qpack v0.10.2 for new API -- and for a bug fix. 216 - [BUGFIX] Typo in IETF conn SETTINGS writer. 217 - Use latest BoringSSL. 218 2192019-10-08 220 - 2.4.4 221 - [API] Add lsquic_alpn2ver() to aid parsing Alt-Svc header. 222 - [BUGFIX] NULL dereference when H3 frame header would be split. 223 - [BUGFIX] Do not close fixed-size H3 frame prematurely. 224 - [BUGFIX] Allow PING frames in IETF mini conn. 225 - [BUGFIX] Mini conns: don't send any packets after receiving 226 CONNECTION_CLOSE. 227 - [BUGFIX] Client migration: reserve slot for DCID from transport params. 228 - [BUGFIX] Allow max_early_data_size=0 -- early_data might not be there. 229 - [BUGFIX] Use an invalid stream number to reset BPT cache (zero is now a 230 valid stream number). 231 - [SPEC] Use FINAL_SIZE_ERROR when FIN mismatch is detected. 232 - [OPTIMIZATION] Closed connection only gets one chance to send packets. 233 - [OPTIMIZATION] Flush headers stream before packetizing stream data. 234 - [OPTIMIZATION] process QPACK encoder STREAM frames immediately. 235 - Update ls-qpack to v0.10.1. 236 2372019-09-30 238 - 2.4.3 239 - Add GQUIC versions to the list of h3 ALPNs for Alt-Svc header. 240 For example, h3-Q043. Chrome will switch to using this format at 241 some point in the future. 242 - [BUGFIX] Send correct value in max_streams_uni transport param 243 - [SPEC] Abort IETF QUIC connection if max_early_data_size is not set 244 to 0xFFFFFFFF 245 2462019-09-23 247 - 2.4.2 248 - [BUGFIX] H3 framing: fix zero-byte write when space is available 249 - [BUGFIX] Don't send STREAM frame when incoming unidirectgional stream 250 is closed 251 - [BUGFIX] Cancel all pending writes by stream reset by a GOAWAY 252 - [BUGFIX] Fix use-after-free in IETF full conn 253 - [OPTIMIZATION] Wait for session tickets for two seconds and then drop 254 SSL object and crypto streams. 255 2562019-09-18 257 - 2.4.0 258 - [FEATURE] QUIC and HTTP/3 Internet Draft 23 support 259 2602019-09-13 261 - 2.3.1 262 - [BUGFIX] Fix memory leaks 263 - [BUGFIX] Fix unit tests 264 2652019-09-12 266 - 2.3.0 267 - [FEATURE] BBR congestion control is on by default 268 - [BUGFIX] BBR app-limited logic 269 - [BUGFIX] Fix uninitialized warnings in IETF 270 - [BUGFIX] Update ls-qpack to v0.9.14 271 - [CLEANUP] Code cleanup 272 2732019-09-11 274 - 2.2.0 275 - [FEATURE] Server code is included in the library 276 - [FEATURE] IETF QUIC and HTTP/3 Support (ID-22) 277 2782019-05-13 279 - 1.21.2 280 - [OPTIMIZATION] HPACK: use history to improve compression performance 281 2822019-05-06 283 - 1.21.1 284 - [BUGFIX] If FIN or RST not received, don't delay stream destruction. 285 - [OPTIMIZATION] Speed up HPACK encoder by using same hash value to 286 search static and dynamic tables. 287 2882019-04-12 289 - 1.21.0 290 - [FEATURE] Add qlog log module. 291 2922019-04-01 293 - 1.20.0 294 - [FEATURE] Add support for Q046. 295 2962019-03-19 297 - 1.19.6 298 - [BUGFIX] Ensure that Largest Observed does not decrease in ACKs we 299 send. ACK frames placed in packets in buffered queues (optimization 300 introduced in 1.17.15) can be preceded by an ACK frame generated later. 301 In this case, the older ACK frame should not be sent out, as Chromium- 302 based servers flags decrease in the ACK frame's Largest Observed value 303 as an error. 304 3052019-03-05 306 - 1.19.5 307 - [BUGFIX] Use correct public key from PUBS based on KEXS index. 308 - [BUGFIX] Check flags before dispatching writes, avoiding assert. 309 - [BUGFIX] Set :scheme to "https" (instead of "HTTP"). 310 3112019-02-25 312 - 1.19.4 313 - [BUGFIX] Check buffer bounds when looking up version in 0-RTT blob. 314 - [BUGFIX] http_client: don't fetch 0-rtt info if handshake failed. 315 - Log number of pacer calls at DEBUG, rather than NOTICE, level. 316 3172019-02-18 318 - 1.19.3 319 - [BUGFIX] Q044: don't encode packet number in 6 bytes. Six-byte 320 packet number encoding does not exist in Q044. This fixes a 321 regression introduced in '[BUGFIX] Buffered packets can contain 322 ACK frames' -- we need to keep QUIC version in mind when selecting 323 the longest possible packet number encoding used for the buffered 324 packet that carries the ACK. 325 - [BUGFIX] Do not increase CWND when timeout occurs. 326 - http_client: support setting handshake timeout on command line. 327 Use -o handshake_to=timeout. 328 - http_client: use -k to connect UDP socket to pick up ICMP errors. 329 - http_client: allow pathless mode, when only handshake is performed 330 without issuing any requests. This can be done by simply not 331 specifying a -p flag on the command line. 332 3332019-02-11 334 - 1.19.2 335 - [BUGFIX] Begin negotiation with version provided in 0-RTT info. 336 - [BUGFIX] Version checking in zero_rtt deserialize function. 337 3382019-02-04 339 - 1.19.1 340 - [BUGFIX] Fix Windows build. 341 3422019-02-04 343 - 1.19.0 344 - [FEATURE, API Change] 0-RTT support. Add function to export 0-RTT 345 information; it can be supplied to a subsequent connect() call. 346 - [FEATURE] Add -0 flag to http_client to exercise 0-RTT support. 347 - [BUGFIX] Resuscitate the Windows build. 348 - [BUGFIX] Send HTTP settings (max header list size) if necessary. 349 - [BUGFIX] Buffered packets can contain ACK frames. 350 - [BUGFIX] Make packet writeable once all STREAM frames are elided. 351 - [BUGFIX] Fix potential null dereference when realloc fails. 352 - cmake: simplify build configuration. 353 3542019-01-28 355 - 1.18.0 356 - [API Change] Can specify clock granularity in engine settings. 357 - [BUGFIX] Pacer uses fixed clock granularity. Since the change on 358 2018-04-09, it is not necessary to try to approximate the next tick 359 time in the pacer: it can use fix clock granularity specified by 360 the user. 361 - [BUGFIX] Do not tick constantly before handshake is done. 362 - [BUGFIX] Do not exit tick prematurely: reuse packet with ACK. Even 363 if we cannot allocate *more* packets, we could still be able to write 364 to one already allocated. 365 - [BUGFIX] Do not schedule pacer if there are no lost packets. 366 3672019-01-17 368 - 1.17.15 369 - [BUGFIX] http_client: make sure only one read per on_read() callback 370 is performed in the header conversion bypass (-B) mode. 371 - http_client: with -E, assign random priority when stream is created. 372 - [OPTIMIZATION] On immediate write, place an ACK frame into the first 373 buffered packet if an ACK is queued. This reduces the number of 374 standalone ACK packets. 375 - [OPTIMIZATION] Allow placing more than one STREAM frame from the same 376 stream into an outgoing packet. This change minimizes the number of 377 buffered packets required to store several small HTTP messages by 378 virtue of allowing more than one STREAM frame from HEADERS stream in 379 the same packet. 380 - [OPTIMIZATION] Flush headers when writing to buffered packets. This 381 causes the headers to be written to the same buffered packet queue, 382 thereby improving packet utilization, especially for small HTTP 383 messages. 384 3852019-01-16 386 - 1.17.14 387 - [FEATURE] http_client can now collect stats: time to connect, TTFB, 388 time to download, requests per seconds, and bandwidth. See -t flag. 389 - [BUGFIX] http_client: -B, -K, and -r can be used at the same time. 390 - [BUGFIX] http_client: do not display cert chain before each request. 391 Now this is only done once per connection, if the handshake is 392 successful and -a option is given. 393 - [BUGFIX] Do not wait to dispatch on_close() after reading. If a 394 stream is scheduled to be closed after on_read() callback returns, 395 close it immediately instead of waiting until the end of the tick. 396 If client creates new request from on_close() event, they will be 397 processed in the same tick instead of waiting for the next one. 398 - [BUGFIX] HEADERS stream is critical: always treat it with highest 399 priority. 400 4012019-01-10 402 - 1.17.12 403 - [FEATURE] http_client can now issue parallel requests in the context 404 of a single connection. See -w option. 405 4062019-01-03 407 - 1.17.11 408 - Fix strict aliasing warning in optimized compilation. 409 4102018-12-27 411 - 1.17.10 412 - Fix the example program to be able to use parallel connections 413 again. (See the -n argument.) 414 4152018-12-18 416 - 1.17.9 417 - [BUGFIX] Engine: reduce minimum batch size from 256 to 4 418 4192018-12-10 420 - 1.17.8 421 - [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux 422 4232018-12-03 424 - 1.17.7 425 - [BUGFIX] Do not unset PING alarm before ringing expired alarms. 426 This prevented PING from ever being sent. 427 4282018-11-29 429 - 1.17.6 430 - Add failsafe: resume sending packets after some time 431 432 The change puts a 1-second limit on the amount of time the engine 433 will not send packets after some packets are delayed. This makes 434 the library robust in case the user does not unblock the engine 435 explicitly using lsquic_engine_send_unsent_packets() call. 436 437 - [BUGFIX] Handle corner cases in send controller when packets are 438 a) delayed or b) dropped during repackaging. 439 - [BUGFIX] Memory leak: destroy buffered packets during controller 440 cleanup. 441 4422018-11-16 443 - 1.17.3 444 - [BUGFIX] Do not send STOP_WAITING frames when using Q044 445 4462018-10-19 447 - 1.17.2 448 - [BUGFIX] Memory leak in test_frame_rw unit test. 449 - [BUGFIX] Parsing packets with short IETF header: do not overwrite 450 flags. (Only a problem in unit tests -- benign otherwise.) 451 4522018-10-16 453 - 1.17.0 454 - [API Change] Packet out Memory Interface (PMI) update: 455 - Split PMI pool return into pmi_release and pmi_return 456 - PMI callbacks take peer_ctx and is_ipv6 arguments 457 - [BUGFIX] Fix use-after-free when certificate is updated 458 - Silence gcc warning in optimized mode by performing useless 459 initialization 460 - cmake: use the standard variable CMAKE_BUILD_TYPE instead of 461 DEVEL_MODE 462 4632018-10-03 464 - 1.16.0 465 - [API Change] Add lsquic_conn_n_avail_streams() 466 - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on 467 4682018-09-27 469 - 1.15.0 470 - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses 471 - [BUGFIX] free uncompressed headers correctly when error occurs 472 4732018-09-12 474 - 1.14.3 475 - [BUGFIX] Do not abort conn on STREAM frame for a reset stream 476 - [BUGFIX] Drop packets that would become empty due to repackaging. 477 Packets on the scheduled queue may be marked for repackaging. 478 Frames such as ACK frame that are never resent are removed from 479 repackaged packets. We must check that the newly repackaged packet 480 would not be empty. If it would be, it is destroyed instead and 481 the next packet on the scheduled queue is used. Note that this 482 change only affects the logic to return the next packet to be sent. 483 Lost packets that are being rescheduled are already processed in 484 this fashion. 485 - Byteswap CID before logging it - this makes it match Chrome CIDs. 486 (Except Q035, which is the last little-endian GQUIC version we 487 support.) 488 4892018-09-06 490 - 1.14.0 491 - [API Change] Disable packet sending if full batch cannot be sent 492 If lsquic_packets_out_f() cannot send the whole batch, disable 493 packet sending until lsquic_engine_send_unsent_packets() is called. 494 - [BUGFIX] Handle case when STREAM frame does not fit. 495 - [BUGFIX] Always allow incoming STREAM frames to overlap. Peers 496 may send overlapping STREAM frames even if using versions older 497 than Q043. 498 - Custom header set fixes: 499 - set "FIN reached" flag when custom header with FIN flag is 500 claimed; 501 - do not return custom header set for a reset stream. 502 5032018-08-27 504 505 - 1.13.0 506 - [FEATURE, API Change] Add ability to create custom header set 507 objects via callbacks. This avoids reading and re-parsing 508 headers from the stream. 509 5102018-08-27 511 512 - 1.12.4 513 - Fix memory leak when engine is destroyed 514 - Fix memory leak in http_client 515 - Fix gcc warning in unit tests 516 5172018-08-22 518 519 - 1.12.3 520 - [BUGFIX] Fix duplicate STREAM frame detection 521 5222018-08-20 523 524 - 1.12.2 525 - [BUGFIX] Update count of scheduled bytes when adjusting size of 526 an already-scheduled packet. 527 - Emit info instead of warning messages when stream is used in 528 unexpected ways. 529 5302018-08-17 531 532 - 1.12.0 533 - [FEATURE, API Change] Add support for certificate verification 534 5352018-08-16 536 537 - 1.11.1 538 - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code 539 5402018-08-15 541 542 - 1.11.0 543 - [FEATURE] Add support for Q044. 544 5452018-08-09 546 547 - 1.10.2 548 - [BUGFIX] Don't go over limit when creating delayed streams 549 5502018-07-10 551 552 - 1.10.1 553 - [BUGFIX] process connections after each batch of packets is read 554 This avoids a problem of accumulating a very large list of packets 555 (possible when speeds are high and socket's receive buffer is large) 556 and processing it all at once. 557 - If glibc is older than 2.17, link with rt. This is necessary for 558 clock_getres(2). 559 - Add version macros to lsquic.h; remove unnecessary includes. 560 5612018-06-13 562 563 - [BUGFIX] allow multiple parallel connections by default 564 565 Use the original method of tracking connections by CIDs by default. 566 If zero-sized CID support is turned on, connections are tracked by 567 the address. A new connection is not created if another connection 568 is using the same network address 569 5702018-05-30 571 572 - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets 573 5742018-05-24 575 576 - Close connection properly when packet encryption fails 577 5782018-05-23 579 580 - [BUGFIX] Do not produce packet sequence gaps due to delayed packets 581 5822018-05-21 583 584 - [API Change] Add optional callback to call when handshake is done 585 - [API Change, BUGFIX] After send failure, wait until transport available 586 5872018-05-18 588 589 - [API] Expose useful lsquic_ver2str[] in lsquic.h 590 - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision 591 - Improve checks of number of incoming streams limit and associated 592 error reporting. 593 - [BUGFIX] Command-line option `-6` now works correctly. 594 5952018-05-16 596 597 - [FEATURE] DNS resolution 598 - [BUGFIX] Frame insertion mis-ID as overlap instead of dup 599 - http_client: fix priority range generated by -E flag 600 6012018-05-09 602 603 - [FEATURE] Add support for Q043. 604 - Support for versions Q037, Q038, Q041, and Q042 has been removed. 605 - Fix typo in debug message. 606 - Fix code indentation. 607 - Add /* fallthru */ comment to stop newer gcc from complaining. 608 - Logger: fix compilation of optimized Windows build. 609 6102018-05-04 611 612 - [FEATURE] Add support for Q042. 613 - Remove comment: MSPC is obsolete (no code changes) 614 - Prog: use lsquic_str2ver() when processing -o version flag 615 - Remove unused CTIM and SRBF transport parameters 616 - Disable QUIC versions Q037 and Q038 by default 617 - Fix Windows compilation by including compat header file in 618 lshpack.c 619 - Address warnings produced by newer versions of gcc 620 - Future-proof: turn off -Werror 621 6222018-05-02 623 624 - [BUGFIX] Make lsquic_conn_quic_version() available 625 - Switch to using ls-hpack 1.1 626 - [BUGFIX] Do not ignore stream resets after receiving FIN 627 6282018-04-27 629 630 - HPACK: do not allow header block to end with table size update. 631 6322018-04-25 633 634 - [BUGFIX] Do not create gap in sent packnos when squeezing delayed 635 packets. 636 - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes. 637 - [BUGFIX] connections with blocked scheduled packets are not tickable 638 for sending. 639 - [BUGFIX] Conn is tickable if it wants to send a connection-level 640 frame. 641 6422018-04-23 643 644 - Fix busy loop: tickable must make progress. When connection is 645 self-reporting as tickable, it must make progress when ticked. There 646 are two issues: 647 1. If there are buffered packets, the connection is only tickable if 648 they can be sent out. 649 2. A connection is tickable if there are streams on the servicing 650 queue. When the tick occurs, we must service the stream 651 independent of whether any packets are sent. 652 - Fix assertion in pacer which can be incorrect under some 653 conditions. 654 - cmake: do not turn on address sanitizer if in Travis. 655 6562018-04-20 657 658 - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's 659 changes. 660 6612018-04-19 662 663 - [BUGFIX] Add connection to Tickable Queue on stream write 664 - cmake: use MSVC variable instead of trying to detect 665 - engine: improve connection incref/decref logging 666 - stream: don't ignore errors that may occur on triggered flush 667 - connection: remove obsolete method 668 - engine: indicate connection as tickable if previous call went 669 over threshold 670 6712018-04-09 672 673 [API Change, OPTIMIZATION] Only process conns that need to be processed 674 675 The API is simplified: do not expose the user code to several 676 queues. A "connection queue" is now an internal concept. 677 The user processes connections using the single function 678 lsquic_engine_process_conns(). When this function is called, 679 only those connections are processed that need to be processed. 680 A connection needs to be processed when: 681 682 1. New incoming packets have been fed to the connection. 683 2. User wants to read from a stream that is readable. 684 3. User wants to write to a stream that is writeable. 685 4. There are buffered packets that can be sent out. (This 686 means that the user wrote to a stream outside of the 687 lsquic library callback.) 688 5. A control frame (such as BLOCKED) needs to be sent out. 689 6. A stream needs to be serviced or delayed stream needs to 690 be created. 691 7. An alarm rings. 692 8. Pacer timer expires. 693 694 To achieve this, the library places the connections into two 695 priority queues (min heaps): 696 697 1. Tickable Queue; and 698 2. Advisory Tick Time queue (ATTQ). 699 700 Each time lsquic_engine_process_conns() is called, the Tickable 701 Queue is emptied. After the connections have been ticked, they are 702 queried again: if a connection is not being closed, it is placed 703 either in the Tickable Queue if it is ready to be ticked again or 704 it is placed in the Advisory Tick Time Queue. It is assumed that 705 a connection always has at least one timer set (the idle alarm). 706 707 The connections in the Tickable Queue are arranged in the least 708 recently ticked order. This lets connections that have been quiet 709 longer to get their packets scheduled first. 710 711 This change means that the library no longer needs to be ticked 712 periodically. The user code can query the library when is the 713 next tick event and schedule it exactly. When connections are 714 processed, only the tickable connections are processed, not *all* 715 the connections. When there are no tick events, it means that no 716 timer event is necessary -- only the file descriptor READ event 717 is active. 718 719 The following are improvements and simplifications that have 720 been triggered: 721 722 - Queue of connections with incoming packets is gone. 723 - "Pending Read/Write Events" Queue is gone (along with its 724 history and progress checks). This queue has become the 725 Tickable Queue. 726 - The connection hash no longer needs to track the connection 727 insertion order. 728 7292018-04-02 730 731 - [FEATURE] Windows support 732 733 - Reduce stack use -- outgoing packet batch is now allocated on the heap. 734 7352018-03-09 736 737 - [OPTIMIZATION] Merge series of ACKs if possible 738 739 Parsed single-range ACK frames (that is the majority of frames) are 740 saved in the connection and their processing is deferred until the 741 connection is ticked. If several ACKs come in a series between 742 adjacent ticks, we check whether the latest ACK is a strict superset 743 of the saved ACK. If it is, the older ACK is not processed. 744 745 If ACK frames can be merged, they are merged and only one of them is 746 either processed or saved. 747 748 - [OPTIMIZATION] Speed up ACK verification by simplifying send history. 749 750 Never generate a gap in the sent packet number sequence. This reduces 751 the send history to a single number instead of potentially a series of 752 packet ranges and thereby speeds up ACK verification. 753 754 By default, detecting a gap in the send history is not fatal: only a 755 single warning is generated per connection. The connection can continue 756 to operate even if the ACK verification code is not able to detect some 757 inconsistencies. 758 759 - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct 760 761 The first part of struct lsquic_send_ctl now consists of members that 762 are used in lsquic_send_ctl_got_ack() (in the absense of packet loss, 763 which is the normal case). To speed up reads and writes, we no longer 764 try to save space by using 8- and 16-bit integers. Use regular integer 765 width for everything. 766 767 - [OPTIMIZATION] Cache size of sent packet. 768 769 - [OPTIMIZATION] Keep track of the largest ACKed in packet_out 770 771 Instead of parsing our own ACK frames when packet has been acked, 772 use the value saved in the packet_out structure when the ACK frame 773 was generated. 774 775 - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop 776 777 - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed 778 779 - [OPTIMIZATION] Several code-level optimizations to ACK processing. 780 781 - Fix: http_client: fix -I flag; switch assert() to abort() 782 7832018-02-26 784 - [API Change] lsquic_engine_connect() returns pointer to the connection 785 object. 786 - [API Change] Add lsquic_conn_get_engine() to get engine object from 787 connection object. 788 - [API Change] Add lsquic_conn_status() to query connection status. 789 - [API Change] Add add lsquic_conn_set_ctx(). 790 - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345 791 - [OPTIMIZATION] Process handshake STREAM frames as soon as packet 792 arrives. 793 - [OPTIMIZATION] Do not compile expensive send controller sanity check 794 by default. 795 - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header. 796 - [OPTIMIZATION] Only make squeeze function call if necessary. 797 - [OPTIMIZATION] Speed up Q039 ACK frame parsing. 798 - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes. 799 - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating. 800 - [OPTIMIZATION] Prefetch next unacked packet when processing ACK. 801 - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are. 802 ordered. 803 - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation 804 - Fix: reset incoming streams that arrive after we send GOAWAY. 805 - Fix: delay client on_new_conn() call until connection is fully set up. 806 - Fixes to buffered packets logic: splitting, STREAM frame elision. 807 - Fix: do not dispatch on_write callback if no packets are available. 808 - Fix WINDOW_UPDATE send and resend logic. 809 - Fix STREAM frame extension code. 810 - Fix: Drop unflushed data when stream is reset. 811 - Switch to tracking CWND using bytes rather than packets. 812 - Fix TCP friendly adjustment in cubic. 813 - Fix: do not generate invalid STOP_WAITING frames during high packet 814 loss. 815 - Pacer fixes. 816 8172017-12-18 818 819 - Fix: better follow cubic curve after idle period 820 - Fix: add missing parts to outgoing packet splitting code 821 - Fix: compilation using gcc 4.8.4 822 8232017-10-31 824 825 - Add APIs.txt -- describes LSQUIC APIs 826 8272017-10-31 828 829 - [API Change] Sendfile-like functionality is gone. The stream no 830 longer opens files and deals with file descriptors. (Among other 831 things, this makes the code more portable.) Three writing functions 832 are provided: 833 834 lsquic_stream_write 835 lsquic_stream_writev 836 lsquic_stream_writef (NEW) 837 838 lsquic_stream_writef() is given an abstract reader that has function 839 pointers for size() and read() functions which the user can implement. 840 This is the most flexible way. lsquic_stream_write() and 841 lsquic_stream_writev() are now both implemented as wrappers around 842 lsquic_stream_writef(). 843 844 - [OPTIMIZATION] When writing to stream, be it within or without the 845 on_write() callback, place data directly into packet buffer, 846 bypassing auxiliary data structures. This reduces amount of memory 847 required, for the amount of data that can be written is limited 848 by the congestion window. 849 850 To support writes outside the on_write() callback, we keep N 851 outgoing packet buffers per connection which can be written to 852 by any stream. One half of these are reserved for the highest 853 priority stream(s), the other half for all other streams. This way, 854 low-priority streams cannot write instead of high-priority streams 855 and, on the other hand, low-priority streams get a chance to send 856 their packets out. 857 858 The algorithm is as follows: 859 860 - When user writes to stream outside of the callback: 861 - If this is the highest priority stream, place it onto the 862 reserved N/2 queue or fail. 863 (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- 864 rather than N/2, allowing high-priority streams to write as 865 much as can be sent.) 866 - If the stream is not the highest priority, try to place the 867 data onto the reserved N/2 queue or fail. 868 - When tick occurs *and* more packets can be scheduled: 869 - Transfer packets from the high N/2 queue to the scheduled 870 queue. 871 - If more scheduling is allowed: 872 - Call on_write callbacks for highest-priority streams, 873 placing resulting packets directly onto the scheduled queue. 874 - If more scheduling is allowed: 875 - Transfer packets from the low N/2 queue to the scheduled 876 queue. 877 - If more scheduling is allowed: 878 - Call on_write callbacks for non-highest-priority streams, 879 placing resulting packets directly onto the scheduled queue 880 881 The number N is currently 20, but it could be varied based on 882 resource usage. 883 884 - If stream is created due to incoming headers, make headers readable 885 from on_new. 886 887 - Outgoing packets are no longer marked non-writeable to prevent placing 888 more than one STREAM frame from the same stream into a single packet. 889 This property is maintained via code flow and an explicit check. 890 Packets for stream data are allocated using a special function. 891 892 - STREAM frame elision is cheaper, as we only perform it if a reset 893 stream has outgoing packets referencing it. 894 895 - lsquic_packet_out_t is smaller, as stream_rec elements are now 896 inside a union. 897 8982017-10-12 899 900 - Do not send RST_STREAM when stream is closed for reading 901 - Raise maximum header size from 4K to 64K 902 - Check header name and value lengths against maximum imposed by HPACK 903 - Fix NULL dereference in stream flow controller 904 9052017-10-09 906 907 - Hide handshake implementation behind a set of function pointers 908 - Use monotonically increasing clock 909 - Make sure that retx delay is not larger than the max of 60 seconds 910 9112017-09-29 912 913 - A few fixes to code and README 914 9152017-09-28 916 917 - Add support for Q041; drop support for Q040 918 9192017-09-27 920 921 - Fix CMakeLists.txt: BoringSSL include and lib was mixed up 922 9232017-09-26 924 925 - Add support for Mac OS 926 - Add support for Raspberry Pi 927 - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly 928 9292017-09-22 930 931 - Initial release 932