summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryse Flowers <bflowers@codeaurora.org>2016-06-01 13:00:12 -0700
committerAdrian DC <radian.dc@gmail.com>2016-12-03 18:15:07 +0100
commit6f38e290a805286cc273980ad9f2c635b518df75 (patch)
tree4521244f2e9f8fde2976d6a95a23c5b714a1e32d
parentc88423e079b19389c6f4c1d1ca5398bcc6e95b97 (diff)
downloadandroid_system_netd-stable/cm-13.0-ZNH5Y.tar.gz
android_system_netd-stable/cm-13.0-ZNH5Y.tar.bz2
android_system_netd-stable/cm-13.0-ZNH5Y.zip
Listen to xt_quota2 kobject event for quotastable/cm-13.0-ZNH5Y
Allow quota limit reached notification to originate from both qlog and xt_quota2 subsystem. On 3.18 Kernel, modify xt_quota2 module to broadcast the Netlink notification via kobject. RM-290 Change-Id: Iaafe521e455d658ed8a2f95fb5114b029323d5ef CRs-Fixed: 1031033
-rw-r--r--server/NetlinkHandler.cpp2
-rw-r--r--server/NetlinkManager.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/NetlinkHandler.cpp b/server/NetlinkHandler.cpp
index 97dc3e03..8038b613 100644
--- a/server/NetlinkHandler.cpp
+++ b/server/NetlinkHandler.cpp
@@ -104,7 +104,7 @@ void NetlinkHandler::onEvent(NetlinkEvent *evt) {
}
}
- } else if (!strcmp(subsys, "qlog")) {
+ } else if (!strcmp(subsys, "qlog") || !strcmp(subsys, "xt_quota2")) {
const char *alertName = evt->findParam("ALERT_NAME");
const char *iface = evt->findParam("INTERFACE");
notifyQuotaLimitReached(alertName, iface);
diff --git a/server/NetlinkManager.cpp b/server/NetlinkManager.cpp
index 76af46f6..769a80ae 100644
--- a/server/NetlinkManager.cpp
+++ b/server/NetlinkManager.cpp
@@ -142,7 +142,7 @@ int NetlinkManager::start() {
if ((mQuotaHandler = setupSocket(&mQuotaSock, NETLINK_NFLOG,
NFLOG_QUOTA_GROUP, NetlinkListener::NETLINK_FORMAT_BINARY, false)) == NULL) {
- ALOGE("Unable to open quota socket");
+ ALOGW("Unable to open qlog quota socket, check if xt_quota2 can send via UeventHandler");
// TODO: return -1 once the emulator gets a new kernel.
}