Add xfrm stats to dumpstate
This change adds the contents of /proc/net/xfrm_stat to the dumpstate
output.
Bug: 76120393
Test: Manually tested
Change-Id: Ie8c18604a4449226ba23709ead62e58471023151
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 59a0047..1884b33 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -108,6 +108,7 @@
#define LOGPERSIST_DATA_DIR "/data/misc/logd"
#define PROFILE_DATA_DIR_CUR "/data/misc/profiles/cur"
#define PROFILE_DATA_DIR_REF "/data/misc/profiles/ref"
+#define XFRM_STAT_PROC_FILE "/proc/net/xfrm_stat"
#define WLUTIL "/vendor/xbin/wlutil"
#define WMTRACE_DATA_DIR "/data/misc/wmtrace"
@@ -1469,9 +1470,12 @@
add_mountinfo();
DumpIpTablesAsRoot();
- // Capture any IPSec policies in play. No keys are exposed here.
+ // Capture any IPSec policies in play. No keys are exposed here.
RunCommand("IP XFRM POLICY", {"ip", "xfrm", "policy"}, CommandOptions::WithTimeout(10).Build());
+ // Dump IPsec stats. No keys are exposed here.
+ DumpFile("XFRM STATS", XFRM_STAT_PROC_FILE);
+
// Run ss as root so we can see socket marks.
RunCommand("DETAILED SOCKET STATE", {"ss", "-eionptu"}, CommandOptions::WithTimeout(10).Build());