Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7212650 authored by Niranjan Pendharkar's avatar Niranjan Pendharkar Committed by Erik Kline
Browse files

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 f10282b8)
parent cd30a463
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;