<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/net/ipv6/ndisc.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-08-15T10:40:28Z</updated>
<entry>
<title>net: fix potential refcount leak in ndisc_router_discovery()</title>
<updated>2022-08-15T10:40:28Z</updated>
<author>
<name>Xin Xiong</name>
<email>xiongx18@fudan.edu.cn</email>
</author>
<published>2022-08-13T12:49:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7396ba87f1edf549284869451665c7c4e74ecd4f'/>
<id>urn:sha1:7396ba87f1edf549284869451665c7c4e74ecd4f</id>
<content type='text'>
The issue happens on specific paths in the function. After both the
object `rt` and `neigh` are grabbed successfully, when `lifetime` is
nonzero but the metric needs change, the function just deletes the
route and set `rt` to NULL. Then, it may try grabbing `rt` and `neigh`
again if above conditions hold. The function simply overwrite `neigh`
if succeeds or returns if fails, without decreasing the reference
count of previous `neigh`. This may result in memory leaks.

Fix it by decrementing the reference count of `neigh` in place.

Fixes: 6b2e04bc240f ("net: allow user to set metric on default route learned via Router Advertisement")
Signed-off-by: Xin Xiong &lt;xiongx18@fudan.edu.cn&gt;
Signed-off-by: Xin Tan &lt;tanxin.ctf@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ipv6: new accept_untracked_na option to accept na only if in-network</title>
<updated>2022-07-16T01:55:50Z</updated>
<author>
<name>Jaehee Park</name>
<email>jhpark1013@gmail.com</email>
</author>
<published>2022-07-13T23:40:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aaa5f515b16b6b3e137779ffb4c9558bb58c1e75'/>
<id>urn:sha1:aaa5f515b16b6b3e137779ffb4c9558bb58c1e75</id>
<content type='text'>
This patch adds a third knob, '2', which extends the
accept_untracked_na option to learn a neighbor only if the src ip is
in the same subnet as an address configured on the interface that
received the neighbor advertisement. This is similar to the arp_accept
configuration for ipv4.

Signed-off-by: Jaehee Park &lt;jhpark1013@gmail.com&gt;
Suggested-by: Roopa Prabhu &lt;roopa@nvidia.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net, neigh: introduce interval_probe_time_ms for periodic probe</title>
<updated>2022-06-30T11:14:35Z</updated>
<author>
<name>Yuwei Wang</name>
<email>wangyuweihx@gmail.com</email>
</author>
<published>2022-06-29T08:48:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=211da42eaa45db7b0edfde187dd88a85fbd466b5'/>
<id>urn:sha1:211da42eaa45db7b0edfde187dd88a85fbd466b5</id>
<content type='text'>
commit ed6cd6a17896 ("net, neigh: Set lower cap for neigh_managed_work rearming")
fixed a case when DELAY_PROBE_TIME is configured to 0, the processing of the
system work queue hog CPU to 100%, and further more we should introduce
a new option used by periodic probe

Signed-off-by: Yuwei Wang &lt;wangyuweihx@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net/ipv6: Expand and rename accept_unsolicited_na to accept_untracked_na</title>
<updated>2022-05-31T09:36:57Z</updated>
<author>
<name>Arun Ajith S</name>
<email>aajith@arista.com</email>
</author>
<published>2022-05-30T10:14:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e0b8f529c10037ae0b369fc892e524eae5a5485'/>
<id>urn:sha1:3e0b8f529c10037ae0b369fc892e524eae5a5485</id>
<content type='text'>
RFC 9131 changes default behaviour of handling RX of NA messages when the
corresponding entry is absent in the neighbour cache. The current
implementation is limited to accept just unsolicited NAs. However, the
RFC is more generic where it also accepts solicited NAs. Both types
should result in adding a STALE entry for this case.

Expand accept_untracked_na behaviour to also accept solicited NAs to
be compliant with the RFC and rename the sysctl knob to
accept_untracked_na.

Fixes: f9a2fb73318e ("net/ipv6: Introduce accept_unsolicited_na knob to implement router-side changes for RFC9131")
Signed-off-by: Arun Ajith S &lt;aajith@arista.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Link: https://lore.kernel.org/r/20220530101414.65439-1-aajith@arista.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net/ipv6: Introduce accept_unsolicited_na knob to implement router-side changes for RFC9131</title>
<updated>2022-04-17T12:23:49Z</updated>
<author>
<name>Arun Ajith S</name>
<email>aajith@arista.com</email>
</author>
<published>2022-04-15T08:34:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f9a2fb73318eb4dbf8cd84866b8b0dd012d8b116'/>
<id>urn:sha1:f9a2fb73318eb4dbf8cd84866b8b0dd012d8b116</id>
<content type='text'>
Add a new neighbour cache entry in STALE state for routers on receiving
an unsolicited (gratuitous) neighbour advertisement with
target link-layer-address option specified.
This is similar to the arp_accept configuration for IPv4.
A new sysctl endpoint is created to turn on this behaviour:
/proc/sys/net/ipv6/conf/interface/accept_unsolicited_na.

Signed-off-by: Arun Ajith S &lt;aajith@arista.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: separate ndisc_ns_create() from ndisc_send_ns()</title>
<updated>2022-02-21T12:13:45Z</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2022-02-21T05:54:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=696c65444120cfe98ae704e86a59df8666fabf1d'/>
<id>urn:sha1:696c65444120cfe98ae704e86a59df8666fabf1d</id>
<content type='text'>
This patch separate NS message allocation steps from ndisc_send_ns(),
so it could be used in other places, like bonding, to allocate and
send IPv6 NS message.

Also export ndisc_send_skb() and ndisc_ns_create() for later bonding usage.

Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Generate netlink notification when default IPv6 route preference changes</title>
<updated>2022-02-14T11:15:37Z</updated>
<author>
<name>Kalash Nainwal</name>
<email>kalash@arista.com</email>
</author>
<published>2022-02-10T22:09:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=806c37ddcf286665adce5c3a99b5fe4424cbf9fe'/>
<id>urn:sha1:806c37ddcf286665adce5c3a99b5fe4424cbf9fe</id>
<content type='text'>
Generate RTM_NEWROUTE netlink notification when the route preference
 changes on an existing kernel generated default route in response to
 RA messages. Currently netlink notifications are generated only when
 this route is added or deleted but not when the route preference
 changes, which can cause userspace routing application state to go
 out of sync with kernel.

Signed-off-by: Kalash Nainwal &lt;kalash@arista.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter</title>
<updated>2021-11-02T02:57:14Z</updated>
<author>
<name>James Prestwood</name>
<email>prestwoj@gmail.com</email>
</author>
<published>2021-11-01T17:36:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=18ac597af25e9760b76471524096f5b29eb820e6'/>
<id>urn:sha1:18ac597af25e9760b76471524096f5b29eb820e6</id>
<content type='text'>
In most situations the neighbor discovery cache should be cleared on a
NOCARRIER event which is currently done unconditionally. But for wireless
roams the neighbor discovery cache can and should remain intact since
the underlying network has not changed.

This patch introduces a sysctl option ndisc_evict_nocarrier which can
be disabled by a wireless supplicant during a roam. This allows packets
to be sent after a roam immediately without having to wait for
neighbor discovery.

A user reported roughly a 1 second delay after a roam before packets
could be sent out (note, on IPv4). This delay was due to the ARP
cache being cleared. During testing of this same scenario using IPv6
no delay was noticed, but regardless there is no reason to clear
the ndisc cache for wireless roams.

Signed-off-by: James Prestwood &lt;prestwoj@gmail.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipv6: constify dev_addr passing</title>
<updated>2021-10-13T16:40:46Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-12T15:58:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1a8a23d2da4fec6f090ec26bbe76eab2b77410e9'/>
<id>urn:sha1:1a8a23d2da4fec6f090ec26bbe76eab2b77410e9</id>
<content type='text'>
In preparation for netdev-&gt;dev_addr being constant
make all relevant arguments in ndisc constant.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipv6: add IFLA_INET6_RA_MTU to expose mtu value</title>
<updated>2021-08-28T00:29:18Z</updated>
<author>
<name>Rocco Yue</name>
<email>rocco.yue@mediatek.com</email>
</author>
<published>2021-08-27T15:04:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=49b99da2c9ce13ffcd93fe3a0f5670791c1d76f7'/>
<id>urn:sha1:49b99da2c9ce13ffcd93fe3a0f5670791c1d76f7</id>
<content type='text'>
The kernel provides a "/proc/sys/net/ipv6/conf/&lt;iface&gt;/mtu"
file, which can temporarily record the mtu value of the last
received RA message when the RA mtu value is lower than the
interface mtu, but this proc has following limitations:

(1) when the interface mtu (/sys/class/net/&lt;iface&gt;/mtu) is
updeated, mtu6 (/proc/sys/net/ipv6/conf/&lt;iface&gt;/mtu) will
be updated to the value of interface mtu;
(2) mtu6 (/proc/sys/net/ipv6/conf/&lt;iface&gt;/mtu) only affect
ipv6 connection, and not affect ipv4.

Therefore, when the mtu option is carried in the RA message,
there will be a problem that the user sometimes cannot obtain
RA mtu value correctly by reading mtu6.

After this patch set, if a RA message carries the mtu option,
you can send a netlink msg which nlmsg_type is RTM_GETLINK,
and then by parsing the attribute of IFLA_INET6_RA_MTU to
get the mtu value carried in the RA message received on the
inet6 device. In addition, you can also get a link notification
when ra_mtu is updated so it doesn't have to poll.

In this way, if the MTU values that the device receives from
the network in the PCO IPv4 and the RA IPv6 procedures are
different, the user can obtain the correct ipv6 ra_mtu value
and compare the value of ra_mtu and ipv4 mtu, then the device
can use the lower MTU value for both IPv4 and IPv6.

Signed-off-by: Rocco Yue &lt;rocco.yue@mediatek.com&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Link: https://lore.kernel.org/r/20210827150412.9267-1-rocco.yue@mediatek.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
