Add Functions to flush SADB, Policy DB, and Ifaces

-Add ipSecFlushState() which flushes the kernel's
 SA DB and Policy DB.
-Add ipSecFlushInterfaces() which seeks and removes
 any interfaces that have the prefix 'ipsec'
-Automatically call these functions when netd restarts
-Make XfrmController's methods static
-Add integration tests to verify flushing of policy
 states, and interfaces
-Convert XfrmController functions to static for easier
 test-ability

Bug: 74560705
Test: runtest ...netd_integration_test.cpp
Merged-In: Id60e7c29ff9aeee7f5ccd505b86c94cce858745f
Change-Id: Id60e7c29ff9aeee7f5ccd505b86c94cce858745f
(cherry picked from commit f5646cde551de44ba10b61c2d5cecb414847d454)
diff --git a/server/Controllers.cpp b/server/Controllers.cpp
index d88a3d4..36181d4 100644
--- a/server/Controllers.cpp
+++ b/server/Controllers.cpp
@@ -30,6 +30,7 @@
 #include "RouteController.h"
 #include "Stopwatch.h"
 #include "oem_iptables_hook.h"
+#include "XfrmController.h"
 
 namespace android {
 namespace net {
@@ -279,6 +280,12 @@
         ALOGE("failed to initialize RouteController (%s)", strerror(-ret));
     }
     ALOGI("Initializing RouteController: %.1fms", s.getTimeAndReset());
+
+    netdutils::Status xStatus = XfrmController::Init();
+    if (!isOk(xStatus)) {
+        ALOGE("Failed to initialize XfrmController (%s)", netdutils::toString(xStatus).c_str());
+    };
+    ALOGI("Initializing XfrmController: %.1fms", s.getTimeAndReset());
 }
 
 Controllers* gCtls = nullptr;