From f10282b830af4c7ea56b2c64e73a7ffd3c006007 Mon Sep 17 00:00:00 2001 From: Niranjan Pendharkar Date: Wed, 18 Oct 2017 16:58:25 -0700 Subject: [PATCH] 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 Change-Id: I76178fd7f109b82a4e4961347b8949937813d71d --- ...server_connectivity_tethering_OffloadHardwareInterface.cpp | 4 ++-- 1 file 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 9a17635721b80..3eaf48845a2fd 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;