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

Commit f10282b8 authored by Niranjan Pendharkar's avatar Niranjan Pendharkar
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

Change-Id: I76178fd7f109b82a4e4961347b8949937813d71d
parent 6a90c3f7
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;