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

   ConditionCidr masked the byte that was just zeroed instead of the 
partial-prefix byte, and kept the low bits instead of the high bits, so any 
IPv6 prefix not a multiple of 8 (e.g. /60) was silently rounded up to the next 
byte boundary. Mask the byte above the zeroed region with a high-bit mask, and 
define the IPv4 /0 case, which was a shift-by-32 (undefined behavior).
   
   The masking math now lives in a header-only, TS-API-free cidr.h so it can be 
unit-tested directly. Adds unit tests for IPv4 /0,/24,/32 and IPv6 
/0,/48,/52,/60,/63,/64,/128, plus IPv4 CIDR cases in the header_rewrite bundle 
replay; the verifier client is IPv4 only, so IPv6 masking is covered by the 
unit test.


-- 
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