Snap for 4751833 from 64848957ba49275896c80790ceeeb6219930f687 to pi-release
Change-Id: Ic167b25d177db6ad0c9204f66ed148d33e99a74a
diff --git a/net/netd/testutils/VtsHalNetNetdTestUtils.cpp b/net/netd/testutils/VtsHalNetNetdTestUtils.cpp
index da377c4..0d4189d 100644
--- a/net/netd/testutils/VtsHalNetNetdTestUtils.cpp
+++ b/net/netd/testutils/VtsHalNetNetdTestUtils.cpp
@@ -88,7 +88,8 @@
int countRulesForFwmark(const uint32_t fwmark) {
// Skip top nibble, which differs between rules.
- std::string regex = StringPrintf("from all fwmark 0x[0-9a-f]+%x/.* lookup ", fwmark);
+ std::string regex =
+ StringPrintf("from all fwmark 0x(%x|[0-9a-f]+%04x)/.* lookup ", fwmark, fwmark);
return countMatchingIpRules(regex);
}