mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-06 17:45:22 +00:00
fix macos test
Summary: mac address can be incomplete, lets add it in the verifier. Reviewed By: fmanco Differential Revision: D13377450 fbshipit-source-id: 057549d058f292fac7969adb242da2e313922c53
This commit is contained in:
parent
3775b82cdb
commit
c58f69bba2
@ -111,10 +111,14 @@ bool verifyEmptyStringOrIpAddress(std::string const& value) {
|
||||
}
|
||||
|
||||
bool verifyMacAddress(std::string const& value) {
|
||||
boost::smatch match;
|
||||
// IEEE 802: six groups of two hexadecimal digits, separated by '-' or ':'
|
||||
boost::regex rxMacAddress("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$");
|
||||
return boost::regex_match(value, match, rxMacAddress);
|
||||
if (value == "incomplete") {
|
||||
return true;
|
||||
} else {
|
||||
boost::smatch match;
|
||||
// IEEE 802: six groups of two hexadecimal digits, separated by '-' or ':'
|
||||
boost::regex rxMacAddress("^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$");
|
||||
return boost::regex_match(value, match, rxMacAddress);
|
||||
}
|
||||
}
|
||||
|
||||
bool verifyUidGid(std::string const& value) {
|
||||
|
Loading…
Reference in New Issue
Block a user