Add expired services removal flag
The TTL check and removal of expired services is currently only
performed when a mDNS query is sent. This can result in expired
services remaining in the cache if no queries are sent. To
address this, the remaining TTL will be checked when retrieving
services from the MdnsServiceCache. Add a new flag to enable
the expired services removal feature. This feature will be
implemented in subsequent changes.
Bug: 265787401
Bug: 304649384
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I30f0eea568ee45d363cc02821de0921d6040f981
diff --git a/common/flags.aconfig b/common/flags.aconfig
index cadc44f..2e552a1 100644
--- a/common/flags.aconfig
+++ b/common/flags.aconfig
@@ -13,3 +13,10 @@
description: "This flag controls the forbidden capability API"
bug: "302997505"
}
+
+flag {
+ name: "nsd_expired_services_removal"
+ namespace: "android_core_networking"
+ description: "Remove expired services from MdnsServiceCache"
+ bug: "304649384"
+}