This change adds a new method to the anonymize.IPAnonymizer interface:
Contains(dst, ip net.IP) bool
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:
Does "192.168.0.1/24" contain "192.168.0.3" ? Yes
Does "2001:668:1f:22::73/64" contain "2001:1900:2100:2d::114" ? No
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 adds a new method to the
anonymize.IPAnonymizer
interface:Contains(dst, ip net.IP) bool
This new method allows a caller to assess whether a given
dst
IP "contains" the second givenip
, ifdst
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