<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp/ipv6.c, branch linux-4.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-07-25T17:56:28Z</updated>
<entry>
<title>sctp: use inet_recvmsg to support sctp RFS well</title>
<updated>2016-07-25T17:56:28Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-07-22T13:25:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd2d180a28cb5075163945d0b229926ec9782ab0'/>
<id>urn:sha1:fd2d180a28cb5075163945d0b229926ec9782ab0</id>
<content type='text'>
Commit 486bdee0134c ("sctp: add support for RPS and RFS")
saves skb-&gt;hash into sk-&gt;sk_rxhash so that the inet_* can
record it to flow table.

But sctp uses sock_common_recvmsg as .recvmsg instead
of inet_recvmsg, sock_common_recvmsg doesn't invoke
sock_rps_record_flow to record the flow. It may cause
that the receiver has no chances to record the flow if
it doesn't send msg or poll the socket.

So this patch fixes it by using inet_recvmsg as .recvmsg
in sctp.

Fixes: 486bdee0134c ("sctp: add support for RPS and RFS")
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: support ipv6 nonlocal bind</title>
<updated>2016-07-25T17:46:04Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-07-22T09:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b97420228881e839b76c8a4506da3cb187bf004'/>
<id>urn:sha1:9b97420228881e839b76c8a4506da3cb187bf004</id>
<content type='text'>
This patch makes sctp support ipv6 nonlocal bind by adding
sp-&gt;inet.freebind and net-&gt;ipv6.sysctl.ip_nonlocal_bind
check in sctp_v6_available as what sctp did to support
ipv4 nonlocal bind (commit cdac4e077489).

Reported-by: Shijoe George &lt;spanjikk@redhat.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: allow GSO frags to access the chunk too</title>
<updated>2016-07-14T01:10:14Z</updated>
<author>
<name>Marcelo Ricardo Leitner</name>
</author>
<published>2016-07-13T18:08:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f45f78f8e511203f03138f2ccde3d2cf90d2cbf'/>
<id>urn:sha1:1f45f78f8e511203f03138f2ccde3d2cf90d2cbf</id>
<content type='text'>
SCTP will try to access original IP headers on sctp_recvmsg in order to
copy the addresses used. There are also other places that do similar access
to IP or even SCTP headers. But after 90017accff61 ("sctp: Add GSO
support") they aren't always there because they are only present in the
header skb.

SCTP handles the queueing of incoming data by cloning the incoming skb
and limiting to only the relevant payload. This clone has its cb updated
to something different and it's then queued on socket rx queue. Thus we
need to fix this in two moments.

For rx path, not related to socket queue yet, this patch uses a
partially copied sctp_input_cb to such GSO frags. This restores the
ability to access the headers for this part of the code.

Regarding the socket rx queue, it removes iif member from sctp_event and
also add a chunk pointer on it.

With these changes we're always able to reach the headers again.

The biggest change here is that now the sctp_chunk struct and the
original skb are only freed after the application consumed the buffer.
Note however that the original payload was already like this due to the
skb cloning.

For iif, SCTP's IPv4 code doesn't use it, so no change is necessary.
IPv6 now can fetch it directly from original's IPv6 CB as the original
skb is still accessible.

In the future we probably can simplify sctp_v*_skb_iif() stuff, as
sctp_v4_skb_iif() was called but it's return value not used, and now
it's not even called, but such cleanup is out of scope for this change.

Fixes: 90017accff61 ("sctp: Add GSO support")
Signed-off-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rename ICMP6_INC_STATS_BH()</title>
<updated>2016-04-28T02:48:24Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2016-04-27T23:44:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a16292a0f0e0cef40ed51685dfde12b3002959b5'/>
<id>urn:sha1:a16292a0f0e0cef40ed51685dfde12b3002959b5</id>
<content type='text'>
Rename ICMP6_INC_STATS_BH() to __ICMP6_INC_STATS()

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>sctp: lack the check for ports in sctp_v6_cmp_addr</title>
<updated>2016-03-01T22:25:12Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2016-02-28T02:03:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40b4f0fd74e46c017814618d67ec9127ff20f157'/>
<id>urn:sha1:40b4f0fd74e46c017814618d67ec9127ff20f157</id>
<content type='text'>
As the member .cmp_addr of sctp_af_inet6, sctp_v6_cmp_addr should also check
the port of addresses, just like sctp_v4_cmp_addr, cause it's invoked by
sctp_cmp_addr_exact().

Now sctp_v6_cmp_addr just check the port when two addresses have different
family, and lack the port check for two ipv6 addresses. that will make
sctp_hash_cmp() cannot work well.

so fix it by adding ports comparison in sctp_v6_cmp_addr().

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: sctp: clone options to avoid use after free</title>
<updated>2015-12-12T01:18:40Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2015-12-09T15:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9470e24f35ab81574da54e69df90c1eb4a96b43f'/>
<id>urn:sha1:9470e24f35ab81574da54e69df90c1eb4a96b43f</id>
<content type='text'>
SCTP is lacking proper np-&gt;opt cloning at accept() time.

TCP and DCCP use ipv6_dup_options() helper, do the same
in SCTP.

We might later factorize this code in a common helper to avoid
future mistakes.

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: sctp: fix lockdep splat in sctp_v6_get_dst()</title>
<updated>2015-12-07T22:07:33Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2015-12-07T16:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69ce6487dcd364245a3d26322fc8f4ffd1e8d947'/>
<id>urn:sha1:69ce6487dcd364245a3d26322fc8f4ffd1e8d947</id>
<content type='text'>
While cooking the sctp np-&gt;opt rcu fixes, I forgot to move
one rcu_read_unlock() after the added rcu_dereference() in
sctp_v6_get_dst()

This gave lockdep warnings reported by Dave Jones.

Fixes: c836a8ba9386 ("ipv6: sctp: add rcu protection around np-&gt;opt")
Reported-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
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: sctp: add rcu protection around np-&gt;opt</title>
<updated>2015-12-03T16:30:58Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2015-12-03T05:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c836a8ba93869d6a0290a6ae0047fbef09066871'/>
<id>urn:sha1:c836a8ba93869d6a0290a6ae0047fbef09066871</id>
<content type='text'>
This patch completes the work I did in commit 45f6fad84cc3
("ipv6: add complete rcu protection around np-&gt;opt"), as I missed
sctp part.

This simply makes sure np-&gt;opt is used with proper RCU locking
and accessors.

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: Add rt6_get_cookie() function</title>
<updated>2015-05-25T17:25:34Z</updated>
<author>
<name>Martin KaFai Lau</name>
</author>
<published>2015-05-23T03:56:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b197df4f0f3782782e9ea8996e91b65ae33e8dd9'/>
<id>urn:sha1:b197df4f0f3782782e9ea8996e91b65ae33e8dd9</id>
<content type='text'>
Instead of doing the rt6-&gt;rt6i_node check whenever we need
to get the route's cookie.  Refactor it into rt6_get_cookie().
It is a prep work to handle FLOWI_FLAG_KNOWN_NH and also
percpu rt6_info later.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Remove external dependency on rt6i_dst and rt6i_src</title>
<updated>2015-05-25T17:25:32Z</updated>
<author>
<name>Martin KaFai Lau</name>
</author>
<published>2015-05-23T03:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd0273d7939f2ce3247f6aac5f6b9a0135d4cd39'/>
<id>urn:sha1:fd0273d7939f2ce3247f6aac5f6b9a0135d4cd39</id>
<content type='text'>
This patch removes the assumptions that the returned rt is always
a RTF_CACHE entry with the rt6i_dst and rt6i_src containing the
destination and source address.  The dst and src can be recovered from
the calling site.

We may consider to rename (rt6i_dst, rt6i_src) to
(rt6i_key_dst, rt6i_key_src) later.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Reviewed-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Cc: Julian Anastasov &lt;ja@ssi.bg&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
