CHANGELOG revision feecb11b
12018-10-19 2 - 1.17.2 3 - [BUGFIX] Memory leak in test_frame_rw unit test. 4 - [BUGFIX] Parsing packets with short IETF header: do not overwrite 5 flags. (Only a problem in unit tests -- benign otherwise.) 6 72018-10-16 8 - 1.17.0 9 - [API Change] Packet out Memory Interface (PMI) update: 10 - Split PMI pool return into pmi_release and pmi_return 11 - PMI callbacks take peer_ctx and is_ipv6 arguments 12 - [BUGFIX] Fix use-after-free when certificate is updated 13 - Silence gcc warning in optimized mode by performing useless 14 initialization 15 - cmake: use the standard variable CMAKE_BUILD_TYPE instead of 16 DEVEL_MODE 17 182018-10-03 19 - 1.16.0 20 - [API Change] Add lsquic_conn_n_avail_streams() 21 - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on 22 232018-09-27 24 - 1.15.0 25 - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses 26 - [BUGFIX] free uncompressed headers correctly when error occurs 27 282018-09-12 29 - 1.14.3 30 - [BUGFIX] Do not abort conn on STREAM frame for a reset stream 31 - [BUGFIX] Drop packets that would become empty due to repackaging. 32 Packets on the scheduled queue may be marked for repackaging. 33 Frames such as ACK frame that are never resent are removed from 34 repackaged packets. We must check that the newly repackaged packet 35 would not be empty. If it would be, it is destroyed instead and 36 the next packet on the scheduled queue is used. Note that this 37 change only affects the logic to return the next packet to be sent. 38 Lost packets that are being rescheduled are already processed in 39 this fashion. 40 - Byteswap CID before logging it - this makes it match Chrome CIDs. 41 (Except Q035, which is the last little-endian GQUIC version we 42 support.) 43 442018-09-06 45 - 1.14.0 46 - [API Change] Disable packet sending if full batch cannot be sent 47 If lsquic_packets_out_f() cannot send the whole batch, disable 48 packet sending until lsquic_engine_send_unsent_packets() is called. 49 - [BUGFIX] Handle case when STREAM frame does not fit. 50 - [BUGFIX] Always allow incoming STREAM frames to overlap. Peers 51 may send overlapping STREAM frames even if using versions older 52 than Q043. 53 - Custom header set fixes: 54 - set "FIN reached" flag when custom header with FIN flag is 55 claimed; 56 - do not return custom header set for a reset stream. 57 582018-08-27 59 60 - 1.13.0 61 - [FEATURE, API Change] Add ability to create custom header set 62 objects via callbacks. This avoids reading and re-parsing 63 headers from the stream. 64 652018-08-27 66 67 - 1.12.4 68 - Fix memory leak when engine is destroyed 69 - Fix memory leak in http_client 70 - Fix gcc warning in unit tests 71 722018-08-22 73 74 - 1.12.3 75 - [BUGFIX] Fix duplicate STREAM frame detection 76 772018-08-20 78 79 - 1.12.2 80 - [BUGFIX] Update count of scheduled bytes when adjusting size of 81 an already-scheduled packet. 82 - Emit info instead of warning messages when stream is used in 83 unexpected ways. 84 852018-08-17 86 87 - 1.12.0 88 - [FEATURE, API Change] Add support for certificate verification 89 902018-08-16 91 92 - 1.11.1 93 - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code 94 952018-08-15 96 97 - 1.11.0 98 - [FEATURE] Add support for Q044. 99 1002018-08-09 101 102 - 1.10.2 103 - [BUGFIX] Don't go over limit when creating delayed streams 104 1052018-07-10 106 107 - 1.10.1 108 - [BUGFIX] process connections after each batch of packets is read 109 This avoids a problem of accumulating a very large list of packets 110 (possible when speeds are high and socket's receive buffer is large) 111 and processing it all at once. 112 - If glibc is older than 2.17, link with rt. This is necessary for 113 clock_getres(2). 114 - Add version macros to lsquic.h; remove unnecessary includes. 115 1162018-06-13 117 118 - [BUGFIX] allow multiple parallel connections by default 119 120 Use the original method of tracking connections by CIDs by default. 121 If zero-sized CID support is turned on, connections are tracked by 122 the address. A new connection is not created if another connection 123 is using the same network address 124 1252018-05-30 126 127 - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets 128 1292018-05-24 130 131 - Close connection properly when packet encryption fails 132 1332018-05-23 134 135 - [BUGFIX] Do not produce packet sequence gaps due to delayed packets 136 1372018-05-21 138 139 - [API Change] Add optional callback to call when handshake is done 140 - [API Change, BUGFIX] After send failure, wait until transport available 141 1422018-05-18 143 144 - [API] Expose useful lsquic_ver2str[] in lsquic.h 145 - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision 146 - Improve checks of number of incoming streams limit and associated 147 error reporting. 148 - [BUGFIX] Command-line option `-6` now works correctly. 149 1502018-05-16 151 152 - [FEATURE] DNS resolution 153 - [BUGFIX] Frame insertion mis-ID as overlap instead of dup 154 - http_client: fix priority range generated by -E flag 155 1562018-05-09 157 158 - [FEATURE] Add support for Q043. 159 - Support for versions Q037, Q038, Q041, and Q042 has been removed. 160 - Fix typo in debug message. 161 - Fix code indentation. 162 - Add /* fallthru */ comment to stop newer gcc from complaining. 163 - Logger: fix compilation of optimized Windows build. 164 1652018-05-04 166 167 - [FEATURE] Add support for Q042. 168 - Remove comment: MSPC is obsolete (no code changes) 169 - Prog: use lsquic_str2ver() when processing -o version flag 170 - Remove unused CTIM and SRBF transport parameters 171 - Disable QUIC versions Q037 and Q038 by default 172 - Fix Windows compilation by including compat header file in 173 lshpack.c 174 - Address warnings produced by newer versions of gcc 175 - Future-proof: turn off -Werror 176 1772018-05-02 178 179 - [BUGFIX] Make lsquic_conn_quic_version() available 180 - Switch to using ls-hpack 1.1 181 - [BUGFIX] Do not ignore stream resets after receiving FIN 182 1832018-04-27 184 185 - HPACK: do not allow header block to end with table size update. 186 1872018-04-25 188 189 - [BUGFIX] Do not create gap in sent packnos when squeezing delayed 190 packets. 191 - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes. 192 - [BUGFIX] connections with blocked scheduled packets are not tickable 193 for sending. 194 - [BUGFIX] Conn is tickable if it wants to send a connection-level 195 frame. 196 1972018-04-23 198 199 - Fix busy loop: tickable must make progress. When connection is 200 self-reporting as tickable, it must make progress when ticked. There 201 are two issues: 202 1. If there are buffered packets, the connection is only tickable if 203 they can be sent out. 204 2. A connection is tickable if there are streams on the servicing 205 queue. When the tick occurs, we must service the stream 206 independent of whether any packets are sent. 207 - Fix assertion in pacer which can be incorrect under some 208 conditions. 209 - cmake: do not turn on address sanitizer if in Travis. 210 2112018-04-20 212 213 - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's 214 changes. 215 2162018-04-19 217 218 - [BUGFIX] Add connection to Tickable Queue on stream write 219 - cmake: use MSVC variable instead of trying to detect 220 - engine: improve connection incref/decref logging 221 - stream: don't ignore errors that may occur on triggered flush 222 - connection: remove obsolete method 223 - engine: indicate connection as tickable if previous call went 224 over threshold 225 2262018-04-09 227 228 [API Change, OPTIMIZATION] Only process conns that need to be processed 229 230 The API is simplified: do not expose the user code to several 231 queues. A "connection queue" is now an internal concept. 232 The user processes connections using the single function 233 lsquic_engine_process_conns(). When this function is called, 234 only those connections are processed that need to be processed. 235 A connection needs to be processed when: 236 237 1. New incoming packets have been fed to the connection. 238 2. User wants to read from a stream that is readable. 239 3. User wants to write to a stream that is writeable. 240 4. There are buffered packets that can be sent out. (This 241 means that the user wrote to a stream outside of the 242 lsquic library callback.) 243 5. A control frame (such as BLOCKED) needs to be sent out. 244 6. A stream needs to be serviced or delayed stream needs to 245 be created. 246 7. An alarm rings. 247 8. Pacer timer expires. 248 249 To achieve this, the library places the connections into two 250 priority queues (min heaps): 251 252 1. Tickable Queue; and 253 2. Advisory Tick Time queue (ATTQ). 254 255 Each time lsquic_engine_process_conns() is called, the Tickable 256 Queue is emptied. After the connections have been ticked, they are 257 queried again: if a connection is not being closed, it is placed 258 either in the Tickable Queue if it is ready to be ticked again or 259 it is placed in the Advisory Tick Time Queue. It is assumed that 260 a connection always has at least one timer set (the idle alarm). 261 262 The connections in the Tickable Queue are arranged in the least 263 recently ticked order. This lets connections that have been quiet 264 longer to get their packets scheduled first. 265 266 This change means that the library no longer needs to be ticked 267 periodically. The user code can query the library when is the 268 next tick event and schedule it exactly. When connections are 269 processed, only the tickable connections are processed, not *all* 270 the connections. When there are no tick events, it means that no 271 timer event is necessary -- only the file descriptor READ event 272 is active. 273 274 The following are improvements and simplifications that have 275 been triggered: 276 277 - Queue of connections with incoming packets is gone. 278 - "Pending Read/Write Events" Queue is gone (along with its 279 history and progress checks). This queue has become the 280 Tickable Queue. 281 - The connection hash no longer needs to track the connection 282 insertion order. 283 2842018-04-02 285 286 - [FEATURE] Windows support 287 288 - Reduce stack use -- outgoing packet batch is now allocated on the heap. 289 2902018-03-09 291 292 - [OPTIMIZATION] Merge series of ACKs if possible 293 294 Parsed single-range ACK frames (that is the majority of frames) are 295 saved in the connection and their processing is deferred until the 296 connection is ticked. If several ACKs come in a series between 297 adjacent ticks, we check whether the latest ACK is a strict superset 298 of the saved ACK. If it is, the older ACK is not processed. 299 300 If ACK frames can be merged, they are merged and only one of them is 301 either processed or saved. 302 303 - [OPTIMIZATION] Speed up ACK verification by simplifying send history. 304 305 Never generate a gap in the sent packet number sequence. This reduces 306 the send history to a single number instead of potentially a series of 307 packet ranges and thereby speeds up ACK verification. 308 309 By default, detecting a gap in the send history is not fatal: only a 310 single warning is generated per connection. The connection can continue 311 to operate even if the ACK verification code is not able to detect some 312 inconsistencies. 313 314 - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct 315 316 The first part of struct lsquic_send_ctl now consists of members that 317 are used in lsquic_send_ctl_got_ack() (in the absense of packet loss, 318 which is the normal case). To speed up reads and writes, we no longer 319 try to save space by using 8- and 16-bit integers. Use regular integer 320 width for everything. 321 322 - [OPTIMIZATION] Cache size of sent packet. 323 324 - [OPTIMIZATION] Keep track of the largest ACKed in packet_out 325 326 Instead of parsing our own ACK frames when packet has been acked, 327 use the value saved in the packet_out structure when the ACK frame 328 was generated. 329 330 - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop 331 332 - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed 333 334 - [OPTIMIZATION] Several code-level optimizations to ACK processing. 335 336 - Fix: http_client: fix -I flag; switch assert() to abort() 337 3382018-02-26 339 - [API Change] lsquic_engine_connect() returns pointer to the connection 340 object. 341 - [API Change] Add lsquic_conn_get_engine() to get engine object from 342 connection object. 343 - [API Change] Add lsquic_conn_status() to query connection status. 344 - [API Change] Add add lsquic_conn_set_ctx(). 345 - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345 346 - [OPTIMIZATION] Process handshake STREAM frames as soon as packet 347 arrives. 348 - [OPTIMIZATION] Do not compile expensive send controller sanity check 349 by default. 350 - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header. 351 - [OPTIMIZATION] Only make squeeze function call if necessary. 352 - [OPTIMIZATION] Speed up Q039 ACK frame parsing. 353 - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes. 354 - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating. 355 - [OPTIMIZATION] Prefetch next unacked packet when processing ACK. 356 - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are. 357 ordered. 358 - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation 359 - Fix: reset incoming streams that arrive after we send GOAWAY. 360 - Fix: delay client on_new_conn() call until connection is fully set up. 361 - Fixes to buffered packets logic: splitting, STREAM frame elision. 362 - Fix: do not dispatch on_write callback if no packets are available. 363 - Fix WINDOW_UPDATE send and resend logic. 364 - Fix STREAM frame extension code. 365 - Fix: Drop unflushed data when stream is reset. 366 - Switch to tracking CWND using bytes rather than packets. 367 - Fix TCP friendly adjustment in cubic. 368 - Fix: do not generate invalid STOP_WAITING frames during high packet 369 loss. 370 - Pacer fixes. 371 3722017-12-18 373 374 - Fix: better follow cubic curve after idle period 375 - Fix: add missing parts to outgoing packet splitting code 376 - Fix: compilation using gcc 4.8.4 377 3782017-10-31 379 380 - Add APIs.txt -- describes LSQUIC APIs 381 3822017-10-31 383 384 - [API Change] Sendfile-like functionality is gone. The stream no 385 longer opens files and deals with file descriptors. (Among other 386 things, this makes the code more portable.) Three writing functions 387 are provided: 388 389 lsquic_stream_write 390 lsquic_stream_writev 391 lsquic_stream_writef (NEW) 392 393 lsquic_stream_writef() is given an abstract reader that has function 394 pointers for size() and read() functions which the user can implement. 395 This is the most flexible way. lsquic_stream_write() and 396 lsquic_stream_writev() are now both implemented as wrappers around 397 lsquic_stream_writef(). 398 399 - [OPTIMIZATION] When writing to stream, be it within or without the 400 on_write() callback, place data directly into packet buffer, 401 bypassing auxiliary data structures. This reduces amount of memory 402 required, for the amount of data that can be written is limited 403 by the congestion window. 404 405 To support writes outside the on_write() callback, we keep N 406 outgoing packet buffers per connection which can be written to 407 by any stream. One half of these are reserved for the highest 408 priority stream(s), the other half for all other streams. This way, 409 low-priority streams cannot write instead of high-priority streams 410 and, on the other hand, low-priority streams get a chance to send 411 their packets out. 412 413 The algorithm is as follows: 414 415 - When user writes to stream outside of the callback: 416 - If this is the highest priority stream, place it onto the 417 reserved N/2 queue or fail. 418 (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- 419 rather than N/2, allowing high-priority streams to write as 420 much as can be sent.) 421 - If the stream is not the highest priority, try to place the 422 data onto the reserved N/2 queue or fail. 423 - When tick occurs *and* more packets can be scheduled: 424 - Transfer packets from the high N/2 queue to the scheduled 425 queue. 426 - If more scheduling is allowed: 427 - Call on_write callbacks for highest-priority streams, 428 placing resulting packets directly onto the scheduled queue. 429 - If more scheduling is allowed: 430 - Transfer packets from the low N/2 queue to the scheduled 431 queue. 432 - If more scheduling is allowed: 433 - Call on_write callbacks for non-highest-priority streams, 434 placing resulting packets directly onto the scheduled queue 435 436 The number N is currently 20, but it could be varied based on 437 resource usage. 438 439 - If stream is created due to incoming headers, make headers readable 440 from on_new. 441 442 - Outgoing packets are no longer marked non-writeable to prevent placing 443 more than one STREAM frame from the same stream into a single packet. 444 This property is maintained via code flow and an explicit check. 445 Packets for stream data are allocated using a special function. 446 447 - STREAM frame elision is cheaper, as we only perform it if a reset 448 stream has outgoing packets referencing it. 449 450 - lsquic_packet_out_t is smaller, as stream_rec elements are now 451 inside a union. 452 4532017-10-12 454 455 - Do not send RST_STREAM when stream is closed for reading 456 - Raise maximum header size from 4K to 64K 457 - Check header name and value lengths against maximum imposed by HPACK 458 - Fix NULL dereference in stream flow controller 459 4602017-10-09 461 462 - Hide handshake implementation behind a set of function pointers 463 - Use monotonically increasing clock 464 - Make sure that retx delay is not larger than the max of 60 seconds 465 4662017-09-29 467 468 - A few fixes to code and README 469 4702017-09-28 471 472 - Add support for Q041; drop support for Q040 473 4742017-09-27 475 476 - Fix CMakeLists.txt: BoringSSL include and lib was mixed up 477 4782017-09-26 479 480 - Add support for Mac OS 481 - Add support for Raspberry Pi 482 - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly 483 4842017-09-22 485 486 - Initial release 487