apache /
kudu /
df5d75c1f6f140a7f5eb2aa77005b941ac5d397d [util] a function to check if IP address is among specified
This patch introduces a new utility function IsAddrOneOf()
to check if an IPv4 address represented by Sockaddr object matches
against a set of other addresses. Any element of the reference set
may be a wildcard. This is just a wrapper for std::any() with proper
custom comparison operator for Sockaddr.
A unit test for the new functionality is added as well.
This patch will be used in a follow-up patch.
Change-Id: I3f6bac9a5fa038d27ba5924f0fd7d5a50b72a7aa
Reviewed-on: http://gerrit.cloudera.org:8080/19230
Tested-by: Alexey Serbin <alexey@apache.org>
Reviewed-by: Attila Bukor <abukor@apache.org>
3 files changed