bryancall opened a new pull request, #14124:
URL: https://github.com/apache/trafficserver/pull/14124

   `DiscreteSpace::erase()` found its starting node with `lower_node()`, which 
returns `nullptr` when the erased range starts below every range in the space. 
The loop then never ran, so nothing was erased, even when the range covered 
existing ranges. `mark()`, `fill()`, `blend()` and `intersection()` already 
start from `head()` in that case, and `erase()` now does too.
   
   One effect: `TSConnectionLimitExemptListRemove`, and the Lua 
`ts.connection_limit_exempt_list_remove`, of a range that starts below every 
exempt entry, such as removing `127.0.0.0/8` when `127.0.0.1` is the only 
entry, returned success but left the address exempt from 
`proxy.config.net.per_client.max_connections_in`. The code has been this way 
since libswoc came into ATS in 
[#8628](https://github.com/apache/trafficserver/pull/8628), and upstream 
libswoc has the same code.
   
   Testing:
   - libswoc unit tests erase from below the first range for IPv4 and IPv6, 
with and without payloads, alongside control cases that pass either way. 
Without the fix 13 of the 29 assertions fail.
   - A ConnectionTracker unit test removes `192.168.1.0/24` from an exempt list 
holding `192.168.1.100` and `192.168.2.1`. Without the fix `192.168.1.100` 
stays exempt.
   - A Uranium test adds and removes exempt ranges from a Lua script and checks 
whether the per-client limit then applies to `127.0.0.1`. Without the fix the 
two covering-range cases are served instead of refused, and the other six cases 
pass.
   
   With the fix, all of these pass in an ASAN build, as do the full ctest suite 
and the `client_connection` Uranium tests.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to