in reply to IP prefix match
You could translate the addresses to binary cut off at the end of the prefix, i.e. '10.1.0.0/16' becomes 0000101000000001, then just compare all binary strings in the list if they begin with any binary string of the list that is shorter. If yes, this prefix is part of the prefix of the shorter string
|
|---|