android_kernel_motorola_sm6375/net/ipv6
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Patrick Rohr 2d6c1375ba BACKPORT: net: change accept_ra_min_rtr_lft to affect all RA lifetimes
commit 5027d54a9c30bc7ec808360378e2b4753f053f25 upstream.

accept_ra_min_rtr_lft only considered the lifetime of the default route
and discarded entire RAs accordingly.

This change renames accept_ra_min_rtr_lft to accept_ra_min_lft, and
applies the value to individual RA sections; in particular, router
lifetime, PIO preferred lifetime, and RIO lifetime. If any of those
lifetimes are lower than the configured value, the specific RA section
is ignored.

In order for the sysctl to be useful to Android, it should really apply
to all lifetimes in the RA, since that is what 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).

The previous implementation dropped the entire RA based on router
lifetime. This turned out to be hard to expand to the other lifetimes
present in the RA in a consistent manner; dropping the entire RA based
on RIO/PIO lifetimes would essentially require parsing the whole thing
twice.

Change-Id: I2168608875629ae07bbd30a02a061284110693e7
Fixes: 1671bcfd76fd ("net: add sysctl accept_ra_min_rtr_lft")
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Patrick Rohr <prohr@google.com>
Reviewed-by: Maciej Żenczykowski <maze@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20230726230701.919212-1-prohr@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-07 10:16:30 -04:00
..
ila UPSTREAM: net: Fix checksum update for ILA adj-transport 2026-02-01 20:44:57 -08:00
netfilter BACKPORT: net: Fix Kconfig indentation, continued 2026-02-01 20:39:45 -08:00
addrconf.c BACKPORT: net: change accept_ra_min_rtr_lft to affect all RA lifetimes 2026-05-07 10:16:30 -04:00
addrconf_core.c
addrlabel.c
af_inet6.c UPSTREAM: bpf: Add get{peer, sock}name attach types for sock_addr 2026-01-14 17:44:17 -08:00
ah6.c net: ipv6: fix field-spanning memcpy warning in AH output 2025-12-03 12:45:09 +01:00
anycast.c
calipso.c calipso: Fix null-ptr-deref in calipso_req_{set,del}attr(). 2025-06-27 11:02:57 +01:00
datagram.c
esp6.c
esp6_offload.c
exthdrs.c
exthdrs_core.c
exthdrs_offload.c
fib6_notifier.c
fib6_rules.c ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure(). 2025-06-04 14:32:34 +02:00
fou6.c
icmp.c
inet6_connection_sock.c
inet6_hashtables.c UPSTREAM: net: export inet_lookup_reuseport and inet6_lookup_reuseport 2026-01-14 18:13:18 -08:00
ip6_checksum.c
ip6_fib.c UPSTREAM: bpf: Enable bpf_iter targets registering ctx argument types 2026-01-14 17:41:40 -08:00
ip6_flowlabel.c
ip6_gre.c
ip6_icmp.c This is the 5.4.299 stable release 2025-09-10 05:55:28 +00:00
ip6_input.c BACKPORT: bpf: Add socket assign support 2025-12-23 13:36:11 -08:00
ip6_offload.c ipv6: reject malicious packets in ipv6_gso_segment() 2025-08-28 16:21:22 +02:00
ip6_offload.h
ip6_output.c ipv6: prevent possible UAF in ip6_xmit() 2025-01-09 13:23:33 +01:00
ip6_tunnel.c net/ip6_tunnel: Prevent perpetual tunnel growth 2025-10-29 13:59:56 +01:00
ip6_udp_tunnel.c BACKPORT: net: Make locking in sock_bindtoindex optional 2026-01-14 17:48:07 -08:00
ip6_vti.c
ip6mr.c ipmr: convert /proc handlers to rcu_read_lock() 2024-12-14 19:44:33 +01:00
ipcomp6.c
ipv6_sockglue.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
Kconfig
Makefile
mcast.c
mcast_snoop.c
mip6.c
ndisc.c BACKPORT: net: change accept_ra_min_rtr_lft to affect all RA lifetimes 2026-05-07 10:16:30 -04:00
netfilter.c netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it 2025-06-27 11:02:46 +01:00
output_core.c
ping.c
proc.c
protocol.c
raw.c ipv6: np->rxpmtu race annotation 2025-12-03 12:45:13 +01:00
reassembly.c
route.c UPSTREAM: bpf: Refactor bpf_iter_reg to have separate seq_info member 2026-01-14 18:12:07 -08:00
seg6.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
seg6_hmac.c ipv6: sr: validate HMAC algorithm ID in seg6_hmac_info_add 2025-08-28 16:21:37 +02:00
seg6_iptunnel.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
seg6_local.c UPSTREAM: seg6: fix seg6_validate_srh() to avoid slab-out-of-bounds 2026-01-14 17:48:10 -08:00
sit.c
syncookies.c
sysctl_net_ipv6.c BACKPORT: sysctl: pass kernel pointers to ->proc_handler 2025-12-23 13:36:15 -08:00
tcp_ipv6.c BACKPORT: bpf: tcp: Add bpf_skops_hdr_opt_len() and bpf_skops_write_hdr_opt() 2026-01-14 18:12:18 -08:00
tcpv6_offload.c
tunnel6.c
udp.c UPSTREAM: Revert "udp: Improve load balancing for SO_REUSEPORT." 2026-01-14 18:13:13 -08:00
udp_impl.h
udp_offload.c UPSTREAM: udp: do not transition UDP GRO fraglist partial checksums to unnecessary 2025-03-10 16:20:02 +00:00
udplite.c
xfrm6_input.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c