ClatdTracker - do not store pointer to NetworkController
Test: build, atest libbpf_android_test libnetdbpf_test netd_integration_test netd_unit_test netdutils_test resolv_integration_test resolv_unit_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I677f40fa5f3694ecdc33be999996768e4e851480
diff --git a/server/ClatdController.h b/server/ClatdController.h
index c93d298..2ea8ee8 100644
--- a/server/ClatdController.h
+++ b/server/ClatdController.h
@@ -54,7 +54,6 @@
private:
struct ClatdTracker {
- const NetworkController* netCtrl = nullptr;
pid_t pid = -1;
unsigned ifIndex;
char iface[IFNAMSIZ];
@@ -69,10 +68,7 @@
in6_addr pfx96;
char pfx96String[INET6_ADDRSTRLEN];
- ClatdTracker() = default;
- explicit ClatdTracker(const NetworkController* netCtrl) : netCtrl(netCtrl) {}
-
- int init(const std::string& interface, const std::string& nat64Prefix);
+ int init(unsigned networkId, const std::string& interface, const std::string& nat64Prefix);
};
std::mutex mutex;