On Thu, Dec 6, 2018 at 1:38 PM David Miller wrote:
>
> From: Xin Long
> Date: Wed, 5 Dec 2018 14:49:40 +0800
>
> > This patch is to separate the base data memory from struct flex_array and
> > save it into a page. With this change, total_nr_elements of a flex_arra
-by: Neil Horman
Signed-off-by: Xin Long
---
include/linux/flex_array.h | 11 +
lib/flex_array.c | 58 ++
2 files changed, 69 insertions(+)
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h
index 29ad65f..19ff58d
lex_array_clear() and flex_array_shrink() are called to
free the unused memory before shrinking.
Fixes: 5e32a431 ("sctp: introduce stream scheduler foundations")
Reported-by: Ying Xu
Reported-by: syzbot+e33a3a138267ca119...@syzkaller.appspotmail.com
Suggested-by: Neil Horman
in the next patch.
Suggested-by: Neil Horman
Signed-off-by: Xin Long
---
include/linux/flex_array.h | 29 +
lib/flex_array.c | 15 ---
2 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/include/linux/flex_array.h b/include/linux
memory so far.
Xin Long (3):
flex_array: make FLEX_ARRAY_BASE_SIZE the same value of
FLEX_ARRAY_PART_SIZE
flex_array: support flex_array_resize
sctp: fa_resize sctp stream instead of redo fa_alloc
include/linux/flex_array.h | 40 ++---
lib/flex_array.c | 73
On Sat, Dec 1, 2018 at 12:23 AM Neil Horman wrote:
>
> On Fri, Nov 30, 2018 at 10:48:10PM +0900, Xin Long wrote:
> > On Fri, Nov 30, 2018 at 9:21 PM Neil Horman wrote:
> > >
> > > On Fri, Nov 30, 2018 at 03:22:39PM +0900, Xin Long wrote:
> > > > On
new
transport")
Reported-by: syzbot+0b05d8aa7cb185107...@syzkaller.appspotmail.com
Reported-by: syzbot+aad231d51b1923158...@syzkaller.appspotmail.com
Suggested-by: Neil Horman
Signed-off-by: Xin Long
---
include/net/sctp/structs.h | 2 ++
net/sctp/associola.c | 2 +-
2 files changed
On Fri, Nov 30, 2018 at 11:27 PM Neil Horman wrote:
>
> On Fri, Nov 30, 2018 at 11:15:50PM +0900, Xin Long wrote:
> > On Fri, Nov 30, 2018 at 10:33 PM Marcelo Ricardo Leitner
> > wrote:
> > >
> > > On Fri, Nov 30, 2018 at 07:32:36AM -0500, Neil Horman wrote:
&
On Fri, Nov 30, 2018 at 10:33 PM Marcelo Ricardo Leitner
wrote:
>
> On Fri, Nov 30, 2018 at 07:32:36AM -0500, Neil Horman wrote:
> > On Fri, Nov 30, 2018 at 02:04:16PM +0900, Xin Long wrote:
> > > On Fri, Nov 30, 2018 at 5:52 AM Neil Horman wrote:
> > > >
>
On Fri, Nov 30, 2018 at 9:21 PM Neil Horman wrote:
>
> On Fri, Nov 30, 2018 at 03:22:39PM +0900, Xin Long wrote:
> > On Thu, Nov 29, 2018 at 11:39 PM Neil Horman wrote:
> > >
> > > On Thu, Nov 29, 2018 at 02:42:56PM +0800, Xin Long wrote:
> > > > Now whe
On Thu, Nov 29, 2018 at 11:39 PM Neil Horman wrote:
>
> On Thu, Nov 29, 2018 at 02:42:56PM +0800, Xin Long wrote:
> > Now when using stream reconfig to add out streams, stream->out
> > will get re-allocated, and all old streams' information will
> > be copied to th
On Fri, Nov 30, 2018 at 5:52 AM Neil Horman wrote:
>
> On Thu, Nov 29, 2018 at 02:44:07PM +0800, Xin Long wrote:
> > Without holding transport to dereference its asoc, a use after
> > free panic can be caused in sctp_epaddr_lookup_transport. Note
> > that a
On Thu, Nov 29, 2018 at 9:50 PM Neil Horman wrote:
>
> On Thu, Nov 29, 2018 at 02:42:56PM +0800, Xin Long wrote:
> > Now when using stream reconfig to add out streams, stream->out
> > will get re-allocated, and all old streams' information will
> > be copied to th
gelog.
Fixes: cd2b70875058 ("sctp: check duplicate node before inserting a new
transport")
Reported-by: syzbot+0b05d8aa7cb185107...@syzkaller.appspotmail.com
Signed-off-by: Xin Long
---
net/sctp/input.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/
the changelog.
Fixes: 7fda702f9315 ("sctp: use new rhlist interface on sctp transport
rhashtable")
Reported-by: syzbot+aad231d51b1923158...@syzkaller.appspotmail.com
Signed-off-by: Xin Long
---
net/sctp/input.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a
by: syzbot+e33a3a138267ca119...@syzkaller.appspotmail.com
Signed-off-by: Xin Long
---
net/sctp/stream.c | 20
1 file changed, 20 insertions(+)
diff --git a/net/sctp/stream.c b/net/sctp/stream.c
index 3892e76..30e7809 100644
--- a/net/sctp/stream.c
+++ b/net/sctp/stream.c
@@ -84,6 +
On Thu, Nov 22, 2018 at 2:53 AM Marcelo Ricardo Leitner
wrote:
>
> On Wed, Nov 21, 2018 at 03:47:33PM +0900, Xin Long wrote:
> > On Wed, Nov 21, 2018 at 9:46 AM Marcelo Ricardo Leitner
> > wrote:
> > >
> > > On Tue, Nov 20, 2018 at 07:52:48AM -0500, Neil
eparately in sctp_process_init
and sctp_association_init, per Marcelo's suggestion.
Fixes: 2f5e3c9df693 ("sctp: introduce sctp_assoc_update_frag_point")
Reported-by: Jakub Audykowicz
Signed-off-by: Xin Long
---
net/sctp/associola.c | 7 ---
net/sctp/sm_make_chunk.c | 3 +++
2 fil
On Tue, Nov 27, 2018 at 7:30 PM Xin Long wrote:
>
> On Mon, Nov 26, 2018 at 10:59 PM Neil Horman wrote:
> >
> > On Mon, Nov 26, 2018 at 10:46:33PM +0900, Xin Long wrote:
> > > On Mon, Nov 26, 2018 at 9:54 PM Neil Horman wrote:
> > > >
> > > >
On Mon, Nov 26, 2018 at 10:59 PM Neil Horman wrote:
>
> On Mon, Nov 26, 2018 at 10:46:33PM +0900, Xin Long wrote:
> > On Mon, Nov 26, 2018 at 9:54 PM Neil Horman wrote:
> > >
> > > On Mon, Nov 26, 2018 at 07:22:05PM +0800, Xin Long wrote:
> > > > Now whe
On Mon, Nov 26, 2018 at 9:54 PM Neil Horman wrote:
>
> On Mon, Nov 26, 2018 at 07:22:05PM +0800, Xin Long wrote:
> > Now when using stream reconfig to add out streams, stream->out
> > will get re-allocated, and all old streams' information will
> > be copied to th
On Mon, Nov 26, 2018 at 9:29 PM Marcelo Ricardo Leitner
wrote:
>
> On Mon, Nov 26, 2018 at 05:02:11PM +0800, Xin Long wrote:
> > sctp_assoc_update_frag_point() should be called whenever asoc->pathmtu
> > changes, but we missed one place in sctp_association_init(). It would
On Mon, Nov 26, 2018 at 9:27 PM Neil Horman wrote:
>
> On Mon, Nov 26, 2018 at 02:52:44PM +0800, Xin Long wrote:
> > I changed to count sk_wmem_alloc by skb truesize instead of 1 to
> > fix the sk_wmem_alloc leak caused by later truesize's change in
> > xfrm in Commit 02
ot;)
Reported-by: Ying Xu
Reported-by: syzbot+e33a3a138267ca119...@syzkaller.appspotmail.com
Signed-off-by: Xin Long
---
net/sctp/stream.c | 46 --
1 file changed, 32 insertions(+), 14 deletions(-)
diff --git a/net/sctp/stream.c b/net/sctp/stream.c
is also called in
sctp_association_init(). We're doing this also because frag_point
is affected by datachunk's type, namely stream_interleave_0/1.
Fixes: 2f5e3c9df693 ("sctp: introduce sctp_assoc_update_frag_point")
Reported-by: Jakub Audykowicz
Signed-off-by: Xin Long
---
net/sctp/stream_interleave.c
->truesize
is increased in sctp_packet_gso_append() as xfrm does. Otherwise,
sctp gso packet will cause sk_wmem_alloc underflow.
Fixes: 02968ccf0125 ("sctp: count sk_wmem_alloc by skb truesize in
sctp_packet_transmit")
Signed-off-by: Xin Long
---
net/sctp/output.c | 1 +
1 file change
On Wed, Nov 21, 2018 at 9:46 AM Marcelo Ricardo Leitner
wrote:
>
> On Tue, Nov 20, 2018 at 07:52:48AM -0500, Neil Horman wrote:
> > On Tue, Nov 20, 2018 at 07:09:16PM +0800, Xin Long wrote:
> > > In sctp_hash_transport, it dereferences a transport's asoc only under
> &g
asoc in sctp_transport_get_next") is
needed to hold the transport before accessing its asoc in
sctp_epaddr_lookup_transport.
Fixes: 7fda702f9315 ("sctp: use new rhlist interface on sctp transport
rhashtable")
Reported-by: syzbot+aad231d51b1923158...@syzkaller.appspotmail.com
Signed-off-by
asoc in sctp_transport_get_next") is needed to hold
the transport before accessing its asoc in sctp_hash_transport.
Fixes: cd2b70875058 ("sctp: check duplicate node before inserting a new
transport")
Reported-by: syzbot+0b05d8aa7cb185107...@syzkaller.appspotmail.com
Signed-off-by: Xin Long
---
On Sat, Nov 17, 2018 at 4:18 PM syzbot
wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:ccda4af0f4b9 Linux 4.20-rc2
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=156cd53340
> kernel config:
port+0xacb/0xb20
> net/sctp/input.c:971
> Read of size 8 at addr 8881cde426b0 by task syz-executor3/18110
>
The same fix is needed in sctp_epaddr_lookup_transport() as:
commit bab1be79a5169ac748d8292b20c86d874022d7ba
Author: Xin Long
Date: Mon Aug 27 18:38:31
ad8_noabort+0x14/0x20 mm/kasan/report.c:433
> sctp_hash_transport+0x803/0x810 net/sctp/input.c:958
Caused by:
commit cd2b708750582e327789d8fb07c6eb5f79f7759f
Author: Xin Long
Date: Fri Feb 17 16:35:24 2017 +0800
sctp: check duplicate node before inserting a new transport
A same fix is
On Mon, Nov 19, 2018 at 5:49 AM Jakub Audykowicz
wrote:
>
> Calling send on a connected SCTP socket results in kernel panic if
> spp_pathmtu was configured manually before an association is established
> and it was not reconfigured to another value once the association is
> established.
>
> Steps
d7 ("sctp: implement sender-side procedures for Add
Incoming/Outgoing Streams Request Parameter")
Reported-by: Jianwen Ji
Signed-off-by: Xin Long
---
net/sctp/stream.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/sctp/stream.c b/net/sctp/stream.c
index ffb940d..3892e76 100644
---
This reverts commit 22d7be267eaa8114dcc28d66c1c347f667d7878a.
The dst's mtu in transport can be updated by a non sctp place like
in xfrm where the MTU information didn't get synced between asoc,
transport and dst, so it is still needed to do the pmtu check
in sctp_packet_config.
---
, and thus it will not be removed. This patch only changes
the internal storage of the flags.
Signed-off-by: Xin Long
---
include/net/sctp/structs.h | 2 +-
include/net/sctp/ulpevent.h | 39 ---
include/uapi/linux/sctp.h| 6 +-
net/sctp/chunk.c
sctp_event is a structure name defined in RFC for sockopt
SCTP_EVENT. To avoid the conflict, rename it.
Signed-off-by: Xin Long
---
include/net/sctp/constants.h | 2 +-
include/net/sctp/sm.h| 4 ++--
net/sctp/primitive.c | 2 +-
net/sctp/sm_sideeffect.c | 12
This patch adds sockopt SCTP_EVENT described in rfc6525#section-6.2.
With this sockopt users can subscribe to an event from a specified
asoc.
Signed-off-by: Xin Long
---
include/uapi/linux/sctp.h | 7
net/sctp/socket.c | 88 +++
2 files
sable
the event."
As for the old SCTP_EVENTS Option with struct sctp_event_subscribe,
it's being DEPRECATED.
v1->v2:
- fix some key word in changelog that triggerred the filters at
vger.kernel.org.
v2->v3:
- fix an array out of bounds noticed by Neil in patch 1/4.
Xin Long (4)
The member subscribe should be per asoc, so that sockopt SCTP_EVENT
in the next patch can subscribe a event from one asoc only.
Signed-off-by: Xin Long
---
include/net/sctp/structs.h | 2 ++
net/sctp/associola.c | 2 ++
net/sctp/chunk.c | 6 ++
net/sctp/socket.c
xes: 28aa4c26fce2 ("sctp: add SCTP_PR_SUPPORTED on sctp sockopt")
Reported-by: Ying Xu
Signed-off-by: Xin Long
---
net/sctp/socket.c | 26 +-
1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 739f3e5..bf618d1 100644
-
ued to count for writable space since
Commit cd305c74b0f8 ("sctp: use sk_wmem_queued to check for writable
space"), it's ok to fix it by counting sk_wmem_alloc by skb truesize
in sctp_packet_transmit.
Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible")
Reported-b
:36PM -0200, Marcelo Ricardo Leitner wrote:
> > > > On Thu, Nov 15, 2018 at 04:43:10PM -0500, Neil Horman wrote:
> > > > > On Thu, Nov 15, 2018 at 03:22:21PM -0200, Marcelo Ricardo Leitner
> > > wrote:
> > > > > > On Thu, Nov 15, 2018 at 07:14:28
On Fri, Nov 16, 2018 at 2:22 AM Marcelo Ricardo Leitner
wrote:
>
> On Thu, Nov 15, 2018 at 07:14:28PM +0800, Xin Long wrote:
> > As rfc7496#section4.5 says about SCTP_PR_SUPPORTED:
> >
> >This socket option allows the enabling or disabling of the
> >
)
Reported-by: Ying Xu
Signed-off-by: Xin Long
---
net/sctp/socket.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 739f3e5..e9b8232 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3940,7 +3940,6 @@
On Thu, Nov 15, 2018 at 3:33 PM David Ahern wrote:
>
> On 11/14/18 11:03 AM, David Ahern wrote:
> > On 11/13/18 8:48 AM, Xin Long wrote:
> >> These is no need to hold dst before calling rt6_remove_exception_rt().
> >> The call to dst_hold_safe() in ip6_lin
On Wed, Nov 14, 2018 at 2:16 AM Neil Horman wrote:
>
> On Tue, Nov 13, 2018 at 02:24:53PM +0800, Xin Long wrote:
> >
> > /* Default Peer Address Parameters. These defaults can
> >* be modified via SCTP_PEER_ADDR_PARAMS
> > @@ -
/ipv6: separate handling of FIB entries from dst based
routes")
Fixes: 23fb93a4d3f1 ("net/ipv6: Cleanup exception and cache route handling")
Reported-by: Li Shuang
Signed-off-by: Xin Long
---
net/ipv6/route.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
On Tue, Nov 13, 2018 at 1:26 AM Xin Long wrote:
>
> This patchset mainly adds the Event Subscription sockopt described in
> rfc6525#section-6.2:
>
> Subscribing to events as described in [RFC6458] uses a setsockopt()
> call with the SCTP_EVENT socket option. This option tak
The member subscribe should be per asoc, so that sockopt SCTP_EVENT
in the next patch can subscribe a event from one asoc only.
Signed-off-by: Xin Long
---
include/net/sctp/structs.h | 2 ++
net/sctp/associola.c | 2 ++
net/sctp/chunk.c | 6 ++
net/sctp/socket.c
This patch adds sockopt SCTP_EVENT described in rfc6525#section-6.2.
With this sockopt users can subscribe to an event from a specified
asoc.
Signed-off-by: Xin Long
---
include/uapi/linux/sctp.h | 7
net/sctp/socket.c | 89 +++
2 files
, and thus it will not be removed. This patch only changes
the internal storage of the flags.
Signed-off-by: Xin Long
---
include/net/sctp/structs.h | 2 +-
include/net/sctp/ulpevent.h | 39 ---
include/uapi/linux/sctp.h| 6 +-
net/sctp/chunk.c
sctp_event is a structure name defined in RFC for sockopt
SCTP_EVENT. To avoid the conflict, rename it.
Signed-off-by: Xin Long
---
include/net/sctp/constants.h | 2 +-
include/net/sctp/sm.h| 4 ++--
net/sctp/primitive.c | 2 +-
net/sctp/sm_sideeffect.c | 12
sable
the event."
As for the old SCTP_EVENTS Option with struct sctp_event_subscribe,
it's being DEPRECATED.
Xin Long (4):
sctp: define subscribe in sctp_sock as __u16
sctp: add subscribe per asoc
sctp: rename enum sctp_event to sctp_event_type
sctp: add sockopt SCTP_EVENT
includ
: f6cd651b056f ("l2tp: fix race in duplicate tunnel detection")
Reported-by: Jianlin Shi
Signed-off-by: Xin Long
---
net/l2tp/l2tp_core.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 82cdf90..26f1d43 100644
---
sctp_event is a structure name defined in RFC for sockopt
SCTP_EVENT. To avoid the conflict, rename it.
Signed-off-by: Xin Long
---
include/net/sctp/constants.h | 2 +-
include/net/sctp/sm.h| 4 ++--
net/sctp/primitive.c | 2 +-
net/sctp/sm_sideeffect.c | 12
This patch adds sockopt SCTP_EVENT described in rfc6525#section-6.2.
With this sockopt users can subscribe to an event from a specified
asoc.
Signed-off-by: Xin Long
---
include/uapi/linux/sctp.h | 7
net/sctp/socket.c | 89 +++
2 files
the event.
As for the old SCTP_EVENTS Option with struct sctp_event_subscribe,
it's being DEPRECATED.
Xin Long (4):
sctp: define subscribe in sctp_sock as __u16
sctp: add subscribe per asoc
sctp: rename enum sctp_event to sctp_event_type
sctp: add sockopt SCTP_EVENT
include/net/sctp
are not matched at all.
It will work until sk_reuseport support is added in
sctp_get_port_local() in the next patch.
v1->v2:
- use 'laddr->valid && laddr2->valid' check instead as Marcelo
pointed in sctp_bind_addrs_check().
Acked-by: Neil Horman
Signed-off-by: Xin Long
---
includ
When socks' sk_reuseport is set, the same port and address are allowed
to be bound into these socks who have the same uid.
Note that the difference from sk_reuse is that it allows multiple socks
to listen on the same port and address.
Acked-by: Neil Horman
Signed-off-by: Xin Long
---
include
ted in
__sctp_rcv_lookup_endpoint().
Acked-by: Neil Horman
Signed-off-by: Xin Long
---
net/sctp/input.c | 69 +---
1 file changed, 41 insertions(+), 28 deletions(-)
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 7ab08a5..00f995e 100
:6400 172.16.5.1:1234
Xin Long (3):
sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint
sctp: add sock_reuseport for the sock in __sctp_hash_endpoint
sctp: process sk_reuseport in sctp_get_port_local
include/net/sctp/sctp.h| 2 +-
include/net/sctp/structs.h | 6
On Mon, Oct 22, 2018 at 11:15 PM Marcelo Ricardo Leitner
wrote:
>
> On Sun, Oct 21, 2018 at 12:43:37PM +0800, Xin Long wrote:
> > This is a part of sk_reuseport support for sctp. It defines a helper
> > sctp_bind_addrs_check() to check if the bind_addrs in two socks are
> &
On Mon, Oct 22, 2018 at 11:18 PM Marcelo Ricardo Leitner
wrote:
>
> On Sun, Oct 21, 2018 at 12:43:36PM +0800, Xin Long wrote:
> > This is a part of sk_reuseport support for sctp, and it selects a
> > sock by the hashkey of lport, paddr and dport by default. It will
> >
According to rfc8260#section-4.3.2, SCTP_SS_DEFAULT is required to
defined as SCTP_SS_FCFS or SCTP_SS_RR.
SCTP_SS_FCFS is used for SCTP_SS_DEFAULT's value in this patch.
Fixes: 5e32a431 ("sctp: introduce stream scheduler foundations")
Reported-by: Jianwen Ji
Signed-off-by
tream change event
notification")
Reported-by: Jianwen Ji
Signed-off-by: Xin Long
---
include/uapi/linux/sctp.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index 34dd3d4..680ecc3 100644
--- a/include/uapi/linux/sctp.h
+++ b/in
.
Fixes: 0ac1077e3a54 ("sctp: get pr_assoc and pr_stream all status with
SCTP_PR_SCTP_ALL")
Reported-by: syzbot+5da0d0a72a9e7d791...@syzkaller.appspotmail.com
Suggested-by: Marcelo Ricardo Leitner
Signed-off-by: Xin Long
---
net/sctp/socket.c | 8 +---
1 file changed, 5 insert
of these chunks
in out_chunk_list when removing a transport in sctp_assoc_rm_peer().
Reported-by: syzbot+56a40ceee5fb35932...@syzkaller.appspotmail.com
Signed-off-by: Xin Long
---
net/sctp/associola.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/sctp/associola.c b/net
On Sun, Oct 21, 2018 at 1:43 PM Xin Long wrote:
>
> sctp sk_reuseport allows multiple socks to listen on the same port and
> addresses, as long as these socks have the same uid. This works pretty
> much as TCP/UDP does, the only difference is that sctp is multi-homing
> and all
When socks' sk_reuseport is set, the same port and address are allowed
to be bound into these socks who have the same uid.
Note that the difference from sk_reuse is that it allows multiple socks
to listen on the same port and address.
Signed-off-by: Xin Long
---
include/net/sctp/structs.h | 4
:6400 172.16.5.1:1234
Xin Long (3):
sctp: do reuseport_select_sock in __sctp_rcv_lookup_endpoint
sctp: add sock_reuseport for the sock in __sctp_hash_endpoint
sctp: process sk_reuseport in sctp_get_port_local
include/net/sctp/sctp.h| 2 +-
include/net/sctp/structs.h | 6
This is a part of sk_reuseport support for sctp, and it selects a
sock by the hashkey of lport, paddr and dport by default. It will
work until sk_reuseport support is added in sctp_get_port_local()
in the next patch.
Signed-off-by: Xin Long
---
net/sctp/input.c | 69
are not matched at all.
It will work until sk_reuseport support is added in
sctp_get_port_local() in the next patch.
Signed-off-by: Xin Long
---
include/net/sctp/sctp.h| 2 +-
include/net/sctp/structs.h | 2 ++
net/core/sock_reuseport.c | 1 +
net/sctp/bind_addr.c | 28
sctp data size should be calculated by subtracting data chunk header's
length from chunk_hdr->length, not just data header.
Fixes: 668c9beb9020 ("sctp: implement assign_number for sctp_stream_interleave")
Signed-off-by: Xin Long
---
include/net/sctp/sm.h | 2 +-
1 file changed
s
not increased for the skb allocked for sending, also as TCP does.
SOCK_SNDBUF_LOCK check is also removed here as it's for tx buf auto
tuning which I will add in another patch.
Signed-off-by: Xin Long
---
net/sctp/socket.c | 38 +-
1 file changed, 9 in
hen
sndbuf_policy is not set.
To make this right and also keep consistent between asoc sndbuf_used, sk
sk_wmem_alloc and sk_wmem_queued, use skb->truesize + sizeof(sctp_chunk)
for them.
Signed-off-by: Xin Long
---
include/net/sctp/constants.h | 5 -
net/sctp/outqueue.c | 8 ++--
ne
sctp doesn't count and use asoc sndbuf_used, sk sk_wmem_alloc and
sk_wmem_queued properly, which also causes some problem.
This patchset is to improve it.
Xin Long (2):
sctp: count both sk and asoc sndbuf with skb truesize and sctp_chunk
size
sctp: use sk_wmem_queued to check
is.
When users see this error, they will know the packet hasn't been
sent. And it also makes sense to not free asoc because waiting
connect fails, like the second call for sctp_wait_for_connect in
sctp_sendmsg_to_asoc.
Fixes: 668c9beb9020 ("sctp: implement assign_number for sctp_stream_interleave&q
sockopt")
Fixes: d229d48d183f ("sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp")
Reported-by: Ying Xu
Signed-off-by: Xin Long
---
include/uapi/linux/sctp.h | 1 +
net/sctp/socket.c | 8
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/ua
nfo needs to be atomic_t.
Signed-off-by: Xin Long
---
include/net/sctp/structs.h | 2 ++
net/sctp/associola.c | 3 ++-
net/sctp/input.c | 1 +
net/sctp/output.c | 6 ++
4 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/
set exceptions if skb->len < mtu
>
> drivers/net/geneve.c | 14 +++---
> drivers/net/vxlan.c | 12 ++--
> include/net/dst.h| 10 ++
> 3 files changed, 15 insertions(+), 21 deletions(-)
>
> --
> 2.19.1
>
Series Reviewed-by: Xin Long
On Sat, Oct 13, 2018 at 6:54 AM Stefano Brivio wrote:
>
> We shouldn't abuse exceptions: if the destination MTU is already higher
> than what we're transmitting, no exception should be created.
makes sense, shouldn't ip(6) tunnels also do this?
>
> Fixes: 52a589d51f10 ("geneve: update skb dst
On Fri, Sep 21, 2018 at 2:31 AM David Miller wrote:
>
> From: Xin Long
> Date: Thu, 20 Sep 2018 17:27:28 +0800
>
> > When processing pmtu update from an icmp packet, it calls .update_pmtu
> > with sk instead of skb in sctp_transport_update_pmtu.
> >
&
tion.
Fixes: 4895c771c7f0 ("ipv4: Add FIB nexthop exceptions.")
Reported-by: ian.per...@dialogic.com
Signed-off-by: Xin Long
---
net/sctp/transport.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 12cac85..03
dump a route entry without fibmatch set.
v1->v2:
- not use rt6i_prefsrc.
- also fix the gw dump issue.
Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based
routes")
Reported-by: Jianlin Shi
Signed-off-by: Xin Long
On Tue, Sep 11, 2018 at 12:13 AM David Ahern wrote:
>
> On 9/9/18 12:29 AM, Xin Long wrote:
> >>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> >>> index 18e00ce..e554922 100644
> >>> --- a/net/ipv6/route.c
> >>> +++ b/net/ipv6/route.c
On Sun, Sep 9, 2018 at 9:45 AM David Ahern wrote:
>
> On 9/8/18 3:24 AM, Xin Long wrote:
> > In inet6_rtm_getroute, since Commit 93531c674315 ("net/ipv6: separate
> > handling of FIB entries from dst based routes"), it has used rt->from
> > to dump rout
he gw/nh dump in another patch.
Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based
routes")
Reported-by: Jianlin Shi
Signed-off-by: Xin Long
---
net/ipv6/route.c | 39 ++-
1 file changed, 26 insertions(+), 13 deletions(-)
label and spp_dscp for
sctp_paddrparams")
Signed-off-by: Xin Long
---
net/sctp/socket.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index a0ccfa4..f73e9d3 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2658,10 +2658,12
This patchset fixes two problems in sctp_apply_peer_addr_params()
when setting spp_ipv6_flowlabel or spp_dscp.
Xin Long (2):
sctp: fix invalid reference to the index variable of the iterator
sctp: not traverse asoc trans list if non-ipv6 trans exists for
ipv6_flowlabel
net/sctp/socket.c
is actually an invalid reference.
So fix it by using a new index variable to traverse transport_addr_list
for both SPP_DSCP and SPP_IPV6_FLOWLABEL flags process.
Fixes: 0b0dce7a36fb ("sctp: add spp_ipv6_flowlabel and spp_dscp for
sctp_paddrparams")
Reported-by: Julia Lawall
Signed-off-by
On Wed, Aug 29, 2018 at 7:36 PM Neil Horman wrote:
>
> On Wed, Aug 29, 2018 at 12:08:40AM +0800, Xin Long wrote:
> > On Mon, Aug 27, 2018 at 9:08 PM Neil Horman wrote:
> > >
> > > On Mon, Aug 27, 2018 at 06:38:31PM +0800, Xin Long wrote:
> > > > As M
On Mon, Aug 27, 2018 at 9:08 PM Neil Horman wrote:
>
> On Mon, Aug 27, 2018 at 06:38:31PM +0800, Xin Long wrote:
> > As Marcelo noticed, in sctp_transport_get_next, it is iterating over
> > transports but then also accessing the association directly, without
> > che
p ordering for pingv6 registration
> net: rtnl: return early from rtnl_unregister_all when protocol isn't
> registered
>
> net/core/rtnetlink.c | 4
> net/ipv6/af_inet6.c | 10 +-
> 2 files changed, 9 insertions(+), 5 deletions(-)
>
> --
> 2.18.0
>
>
Series Reviewed-by: Xin Long
erspan version.")
Reported-by: Jianlin Shi
Signed-off-by: Xin Long
---
net/ipv4/ip_gre.c | 3 +++
net/ipv6/ip6_gre.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 51a5d06..ae714ae 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
After changing rhashtable_walk_start to return void, start_fail would
never be set other value than 0, and the checking for start_fail is
pointless, so remove it.
Fixes: 97a6ec4ac021 ("rhashtable: Change rhashtable_walk_start to return void")
Signed-off-by: Xin Long
---
net/sctp/
. With
that, sctp_transport_hold calls can be removed in the later places.
Fixes: 626d16f50f39 ("sctp: export some apis or variables for sctp_diag and
reuse some for proc")
Reported-by: syzbot+fe62a0c9aa6a85c6d...@syzkaller.appspotmail.com
Signed-off-by: Xin Long
---
net/sctp/proc.c | 4
net/sct
for the ipv4 min mtu check in ip6_tnl_xmit.
While at it, change to use max() instead of if statement.
Fixes: c9fefa08190f ("ip6_tunnel: get the min mtu properly in ip6_tnl_xmit")
Reported-by: Sabrina Dubroca
Signed-off-by: Xin Long
---
net/ipv6/ip6_tunnel.c | 8 ++--
1 file changed, 2
necessary to implement it in the route rx path.
Note that route cache needs to be flushed when bc_forwarding is
changed.
Signed-off-by: Xin Long
---
include/linux/inetdevice.h | 1 +
include/uapi/linux/ip.h | 1 +
include/uapi/linux/netconf.h | 1 +
net/ipv4/devinet.c | 11
As Ido's suggestion, this patch is to add a selftest for directed
broadcast forwarding with vrf. It does the assertion by checking
the src IP of the echo-reply packet in ping_test_from.
Signed-off-by: Xin Long
---
.../selftests/net/forwarding/router_broadcast.sh | 233 +
1
1 - 100 of 1134 matches
Mail list logo