summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiranjan Pendharkar <npendhar@codeaurora.org>2017-10-18 16:58:25 -0700
committerErik Kline <ek@google.com>2017-10-20 19:05:03 +0900
commita7212650e706031e12bab5c49b197dc9bbe934fb (patch)
tree7380525be6ad154c8f6f3277269a97b1fe376f7f
parentcd30a463c6db8357aa862a6888dcabd3261babb6 (diff)
downloadbase-a7212650e706031e12bab5c49b197dc9bbe934fb.tar.gz
Fix netlink group mismatch in fds used for offload
Existing groups used for binding to netlink conntrack events don't seem to work as expected. Fix this by using exact groups defined in IOffloadConfig hal. Test: as follows - Compiles and boots on walleye - Validated conntrack destroy events are received as expected. - Validated offload works as expected. Bug:68018148 CRs-fixed:2126789 Merged-In: I2dcebec1c08bb7b067621331533d8a65dd7b5083 Merged-In: I96d6d5601aff009879f452975be91b6e7e40bb57 Change-Id: I76178fd7f109b82a4e4961347b8949937813d71d (cherry picked from commit f10282b830af4c7ea56b2c64e73a7ffd3c006007)
-rw-r--r--services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp b/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp
index 9a17635721b8..3eaf48845a2f 100644
--- a/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp
+++ b/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp
@@ -103,8 +103,8 @@ static jboolean android_server_connectivity_tethering_OffloadHardwareInterface_c
// fd2 A file descriptor bound to the following netlink groups
// (NF_NETLINK_CONNTRACK_UPDATE | NF_NETLINK_CONNTRACK_DESTROY).
base::unique_fd
- fd1(conntrackSocket(NFNLGRP_CONNTRACK_NEW | NFNLGRP_CONNTRACK_DESTROY)),
- fd2(conntrackSocket(NFNLGRP_CONNTRACK_UPDATE | NFNLGRP_CONNTRACK_DESTROY));
+ fd1(conntrackSocket(NF_NETLINK_CONNTRACK_NEW | NF_NETLINK_CONNTRACK_DESTROY)),
+ fd2(conntrackSocket(NF_NETLINK_CONNTRACK_UPDATE | NF_NETLINK_CONNTRACK_DESTROY));
if (fd1.get() < 0 || fd2.get() < 0) {
ALOGE("Unable to create conntrack handles: %d/%s", errno, strerror(errno));
return false;