Commit 75d9eb45 authored by Patrick Rohr's avatar Patrick Rohr Committed by Ben Fennema
Browse files

ANDROID: Hack to support ABI stable accept_ra_min_lft



This is an Android-only hack (ab)using padding in ipv6_devconf to
implement an ABI-stable version of accept_ra_min_lft.

accept_ra_min_lft applies to all lifetimes in an RA and ignores the
respective RA section if its lifetime is lower than the specified value.
This determines the minimum frequency at which RAs must be processed by
the kernel. Android uses hardware offloads to drop RAs for a fraction of
the minimum of all lifetimes present in the RA (some networks have very
frequent RAs (5s) with high lifetimes (2h)). Despite this, we have
encountered networks that set the router lifetime to 30s which results
in very frequent CPU wakeups. Instead of disabling IPv6 (and dropping
IPv6 ethertype in the WiFi firmware) entirely on such networks, it seems
better to ignore the misconfigured routers while still processing RAs
from other IPv6 routers on the same network (i.e.  to support IoT
applications).

This change consists of adapted versions of the following upstream
changes (which will be available in 6.5):

- net-next 1671bcfd ("net: add sysctl accept_ra_min_rtr_lft")
- net-next 5027d54a ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes")
- net-next 5cb24968 ("net: release reference to inet6_dev pointer")

Bug: 290863811
Bug: 296625638
Bug: 297704110
Test: net tests (aosp/2714695)
Signed-off-by: default avatarPatrick Rohr <prohr@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:ae0fb8d614c267b5197bf7ac1dca4a6d85b52200)
Merged-In: I9a90fd77b13d3285f4cff6391a5b50654c0001df
Change-Id: I9a90fd77b13d3285f4cff6391a5b50654c0001df
parent 566b7b51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment