m-lab / go

General purpose libraries / APIs for use in mlab code.
Apache License 2.0
5 stars 6 forks source link

Add IP Anonymization Contains method #153

Closed stephen-soltesz closed 1 year ago

stephen-soltesz commented 1 year ago

This change adds a new method to the anonymize.IPAnonymizer interface:

This new method allows a caller to assess whether a given dst IP "contains" the second given ip, if dst were treated as a netblock based on the configured anonymization method.

For example:

This functionality is helpful for applying netblock anonymization to hop IPs within a client subnet, even if they are not the same as the client IP.


This change is Reviewable

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 1202


Totals Coverage Status
Change from base Build 1193: 0.06%
Covered Lines: 2153
Relevant Lines: 2280

💛 - Coveralls