rgo commented on a change in pull request #9937:
URL: https://github.com/apache/kafka/pull/9937#discussion_r606841635



##########
File path: build.gradle
##########
@@ -752,6 +752,7 @@ project(':core') {
   dependencies {
     compile project(':clients')
     compile project(':raft')
+    compile group: 'net.ripe.ipresource', name: 'ipresource', version: '1.47'

Review comment:
       @jeqo sorry for the delay.
   
   I've been reviewing the code flow and I don't see it easily replaceable:
   
   - ACL IP ranges are parsed and validated as slash notation(e.g. 
"10.0.0.0/16"), comma prefix notation (e.g. "10.0.0.0/16,/24,/25,/31") and 
ranges with dash (e.g. "10.0.0.0-10.1.2.3").
   - Host IPs are parsed to be valid IPv4 and IPv6 adresses.
   - For IPv6 cases, it's able to handle compressed IP adresses.
   - Ranges and IPs validation check not only format but values (e.g. not out 
bounded values are allowed as 256.0.0.0)
   - Compare probably is the easier part, ensure that ACL and host IP are the 
same type and check if host IP is inside the range.
   
   I'd like to add that ipresource has a good test suite, it's covering a lot 
of cases 
https://github.com/RIPE-NCC/ipresource/tree/master/src/test/java/net/ripe/ipresource
   




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to