<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ipv6/ndisc.c, branch linux-6.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-10-10T20:02:55Z</updated>
<entry>
<title>net: change accept_ra_min_rtr_lft to affect all RA lifetimes</title>
<updated>2023-10-10T20:02:55Z</updated>
<author>
<name>Patrick Rohr</name>
</author>
<published>2023-07-26T23:07:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c59c9d539a44e3cc4194b3601120c4b10d046eb9'/>
<id>urn:sha1:c59c9d539a44e3cc4194b3601120c4b10d046eb9</id>
<content type='text'>
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.

Fixes: 1671bcfd76fd ("net: add sysctl accept_ra_min_rtr_lft")
Cc: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Signed-off-by: Patrick Rohr &lt;prohr@google.com&gt;
Reviewed-by: Maciej Żenczykowski &lt;maze@google.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Link: https://lore.kernel.org/r/20230726230701.919212-1-prohr@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: add sysctl accept_ra_min_rtr_lft</title>
<updated>2023-10-10T20:02:55Z</updated>
<author>
<name>Patrick Rohr</name>
</author>
<published>2023-07-19T14:52:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2b10fd6d417361879e80a9bb9d06c61d88b2053'/>
<id>urn:sha1:b2b10fd6d417361879e80a9bb9d06c61d88b2053</id>
<content type='text'>
commit 1671bcfd76fdc0b9e65153cf759153083755fe4c upstream.

This change adds a new sysctl accept_ra_min_rtr_lft to specify the
minimum acceptable router lifetime in an RA. If the received RA router
lifetime is less than the configured value (and not 0), the RA is
ignored.
This is useful for mobile devices, whose battery life can be impacted
by networks that configure RAs with a short lifetime. On such networks,
the device should never gain IPv6 provisioning and should attempt to
drop RAs via hardware offload, if available.

Signed-off-by: Patrick Rohr &lt;prohr@google.com&gt;
Cc: Maciej Żenczykowski &lt;maze@google.com&gt;
Cc: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipv6: adjust ndisc_is_useropt() to also return true for PIO</title>
<updated>2023-08-09T22:36:12Z</updated>
<author>
<name>Maciej Żenczykowski</name>
</author>
<published>2023-08-07T10:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=048c796beb6eb4fa3a5a647ee1c81f5c6f0f6a2a'/>
<id>urn:sha1:048c796beb6eb4fa3a5a647ee1c81f5c6f0f6a2a</id>
<content type='text'>
The upcoming (and nearly finalized):
  https://datatracker.ietf.org/doc/draft-collink-6man-pio-pflag/
will update the IPv6 RA to include a new flag in the PIO field,
which will serve as a hint to perform DHCPv6-PD.

As we don't want DHCPv6 related logic inside the kernel, this piece of
information needs to be exposed to userspace.  The simplest option is to
simply expose the entire PIO through the already existing mechanism.

Even without this new flag, the already existing PIO R (router address)
flag (from RFC6275) cannot AFAICT be handled entirely in kernel,
and provides useful information that should be exposed to userspace
(the router's global address, for use by Mobile IPv6).

Also cc'ing stable@ for inclusion in LTS, as while technically this is
not quite a bugfix, and instead more of a feature, it is absolutely
trivial and the alternative is manually cherrypicking into all Android
Common Kernel trees - and I know Greg will ask for it to be sent in via
LTS instead...

Cc: Jen Linkova &lt;furry@google.com&gt;
Cc: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: YOSHIFUJI Hideaki / 吉藤英明 &lt;yoshfuji@linux-ipv6.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Maciej Żenczykowski &lt;maze@google.com&gt;
Link: https://lore.kernel.org/r/20230807102533.1147559-1-maze@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>neighbour: annotate lockless accesses to n-&gt;nud_state</title>
<updated>2023-03-15T07:37:32Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2023-03-13T20:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b071af523579df7341cabf0f16fc661125e9a13f'/>
<id>urn:sha1:b071af523579df7341cabf0f16fc661125e9a13f</id>
<content type='text'>
We have many lockless accesses to n-&gt;nud_state.

Before adding another one in the following patch,
add annotations to readers and writers.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Reviewed-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipv6: icmp6: add SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST</title>
<updated>2023-02-20T08:54:23Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2023-02-16T16:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c34b8bb11ebc135e970653bd6fc8e3f863fb6a81'/>
<id>urn:sha1:c34b8bb11ebc135e970653bd6fc8e3f863fb6a81</id>
<content type='text'>
Hosts can often receive neighbour discovery messages
that are not for them.

Use a dedicated drop reason to make clear the packet is dropped
for this normal case.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: icmp6: add SKB_DROP_REASON_IPV6_NDISC_BAD_OPTIONS</title>
<updated>2023-02-20T08:54:23Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2023-02-16T16:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=784d4477f07b930df73bc77e842e03f1dacb83aa'/>
<id>urn:sha1:784d4477f07b930df73bc77e842e03f1dacb83aa</id>
<content type='text'>
This is a generic drop reason for any error detected
in ndisc_parse_options().

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: icmp6: add drop reason support to ndisc_redirect_rcv()</title>
<updated>2023-02-20T08:54:23Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2023-02-16T16:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec993edf05ca4eee5878edf51fdb5ffa2b1decc3'/>
<id>urn:sha1:ec993edf05ca4eee5878edf51fdb5ffa2b1decc3</id>
<content type='text'>
Change ndisc_redirect_rcv() to return a drop reason.

For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED
and values from icmpv6_notify().

More reasons are added later.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: icmp6: add drop reason support to ndisc_router_discovery()</title>
<updated>2023-02-20T08:54:23Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2023-02-16T16:28:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f326d9d9ff46fb2e45fb3b6ae77eff04332dde6'/>
<id>urn:sha1:2f326d9d9ff46fb2e45fb3b6ae77eff04332dde6</id>
<content type='text'>
Change ndisc_router_discovery() to return a drop reason.

For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED
and SKB_CONSUMED.

More reasons are added later.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: icmp6: add drop reason support to ndisc_recv_rs()</title>
<updated>2023-02-20T08:54:23Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2023-02-16T16:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=243e37c642ac1d52858bc5f3559e380babf21169'/>
<id>urn:sha1:243e37c642ac1d52858bc5f3559e380babf21169</id>
<content type='text'>
Change ndisc_recv_rs() to return a drop reason.

For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED
or SKB_CONSUMED. More reasons are added later.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: icmp6: add drop reason support to ndisc_recv_na()</title>
<updated>2023-02-20T08:54:23Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2023-02-16T16:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3009f9ae21ec539985977dcaa0cebb628afeb181'/>
<id>urn:sha1:3009f9ae21ec539985977dcaa0cebb628afeb181</id>
<content type='text'>
Change ndisc_recv_na() to return a drop reason.

For the moment, return PKT_TOO_SMALL, NOT_SPECIFIED
or SKB_CONSUMED. More reasons are added later.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
