[PATCHv4 net-next 0/2] route: add support and selftests for directed broadcast forwarding

2018-07-27 Thread Xin Long
ion. v2->v3: - fix an incorrect 'if check' in devinet_conf_proc as David Ahern noticed. - extend the selftest after one David Ahern fix for vrf. v3->v4: - improve the output log in the selftest as David Ahern suggested. Xin Long (2): route: add support for directed broadcast f

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread Xin Long
On Wed, Jul 25, 2018 at 1:37 AM, David Ahern wrote: > On 7/24/18 11:24 AM, Xin Long wrote: >> On Mon, Jul 23, 2018 at 11:17 PM, David Ahern wrote: >>> On 7/23/18 5:51 AM, Xin Long wrote: >>>> +ping_ipv4() >>>> +{ >>>> +

Re: [PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-24 Thread Xin Long
On Mon, Jul 23, 2018 at 11:17 PM, David Ahern wrote: > On 7/23/18 5:51 AM, Xin Long wrote: >> +ping_ipv4() >> +{ >> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >> + >> + bc_forwarding_disable >> + ping_test_from $h1 198.51.100.25

[PATCHv3 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-23 Thread Xin Long
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 | 215 + 1

[PATCHv3 net-next 1/2] route: add support for directed broadcast forwarding

2018-07-23 Thread Xin Long
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

[PATCHv3 net-next 0/2] route: add support and selftests for directed broadcast forwarding

2018-07-23 Thread Xin Long
ion. v2->v3: - fix an incorrect 'if check' in devinet_conf_proc as David Ahern noticed. - extend the selftest after one David Ahern fix for vrf. Xin Long (2): route: add support for directed broadcast forwarding selftests: add a selftest for directed broadcast forwarding include

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-06 Thread Xin Long
On Thu, Jul 5, 2018 at 10:07 PM, Xin Long wrote: > On Thu, Jul 5, 2018 at 9:18 PM, David Ahern wrote: >> On 7/5/18 1:57 AM, Xin Long wrote: >>> On Thu, Jul 5, 2018 at 2:36 AM, David Ahern wrote: >>>> On 7/4/18 11:56 AM, Xin Long wrote: >>>> >>&g

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread Xin Long
On Thu, Jul 5, 2018 at 4:21 PM, Xin Long wrote: > On Thu, Jul 5, 2018 at 4:39 AM, Ido Schimmel wrote: >> On Thu, Jul 05, 2018 at 01:56:23AM +0800, Xin Long wrote: >>> On Wed, Jul 4, 2018 at 3:23 AM, David Ahern wrote: >>> > your commands are not a proper test. Th

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread Xin Long
On Thu, Jul 5, 2018 at 9:18 PM, David Ahern wrote: > On 7/5/18 1:57 AM, Xin Long wrote: >> On Thu, Jul 5, 2018 at 2:36 AM, David Ahern wrote: >>> On 7/4/18 11:56 AM, Xin Long wrote: >>> >>>>> your commands are not a proper test. The test should succeed

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread Xin Long
On Thu, Jul 5, 2018 at 4:39 AM, Ido Schimmel wrote: > On Thu, Jul 05, 2018 at 01:56:23AM +0800, Xin Long wrote: >> On Wed, Jul 4, 2018 at 3:23 AM, David Ahern wrote: >> > your commands are not a proper test. The test should succeed and fail >> > based on the routing

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-05 Thread Xin Long
On Thu, Jul 5, 2018 at 2:36 AM, David Ahern wrote: > On 7/4/18 11:56 AM, Xin Long wrote: > >>> your commands are not a proper test. The test should succeed and fail >>> based on the routing lookup, not iptables rules. >> A proper test can be done easily with netns, a

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-04 Thread Xin Long
On Wed, Jul 4, 2018 at 3:23 AM, David Ahern wrote: > On 7/3/18 5:36 AM, Xin Long wrote: >> On Mon, Jul 2, 2018 at 11:12 PM, David Ahern wrote: >>> On 7/2/18 12:30 AM, Xin Long wrote: >>>> +ping_ipv4() >>>> +{ >>>> +

Re: [PATCHv2 net-next 1/2] route: add support for directed broadcast forwarding

2018-07-03 Thread Xin Long
On Mon, Jul 2, 2018 at 11:05 PM, David Ahern wrote: > On 7/2/18 12:30 AM, Xin Long wrote: >> @@ -2143,6 +2149,10 @@ static int devinet_conf_proc(struct ctl_table *ctl, >> int write, >> if ((new_value == 0) && (old_value != 0)) >>

Re: [PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-03 Thread Xin Long
On Mon, Jul 2, 2018 at 11:12 PM, David Ahern wrote: > On 7/2/18 12:30 AM, Xin Long wrote: >> +ping_ipv4() >> +{ >> + sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0 >> + bc_forwarding_disable >> + ping_test $h1 198.51.100.255 >> + >> +

[PATCHv2 net] sctp: fix the issue that pathmtu may be set lower than MINSEGMENT

2018-07-03 Thread Xin Long
Marcelo Ricardo Leitner Signed-off-by: Xin Long --- net/sctp/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 445b7ef..12cac85 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c @@ -282,7 +282,7 @@ bool sct

[PATCHv2 net-next 5/5] sctp: check for ipv6_pinfo legal sndflow with flowlabel in sctp_v6_get_dst

2018-07-02 Thread Xin Long
The transport with illegal flowlabel should not be allowed to send packets. Other transport protocols already denies this. Signed-off-by: Xin Long --- net/sctp/ipv6.c | 9 + 1 file changed, 9 insertions(+) diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 772513d..d83ddc4 100644

[PATCHv2 net-next 1/5] ipv4: add __ip_queue_xmit() that supports tos param

2018-07-02 Thread Xin Long
which will be added in next patch. Signed-off-by: Xin Long --- include/net/ip.h | 9 - net/ipv4/ip_output.c | 9 + 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index 0d2281b..09da79d 100644 --- a/include/net/ip.h +++ b/inclu

[PATCHv2 net-next 2/5] sctp: add support for dscp and flowlabel per transport

2018-07-02 Thread Xin Long
needs to set them before looking up route in get_dst. Note that it uses '& 0x10' to check if flowlabel is set and '& 0x1' (tos 1st bit is unused) to check if dscp is set by users, so that they could be set to 0 by sockopt in next patch. Signed-off-by: Xin Long --- include/linu

[PATCHv2 net-next 4/5] sctp: add support for setting flowlabel when adding a transport

2018-07-02 Thread Xin Long
sin6_flowinfo, and it needs to copy sin6_flowinfo from the primary addr. Signed-off-by: Xin Long --- net/sctp/associola.c | 12 ++-- net/sctp/socket.c| 5 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 16ecfbc

[PATCHv2 net-next 3/5] sctp: add spp_ipv6_flowlabel and spp_dscp for sctp_paddrparams

2018-07-02 Thread Xin Long
/setsockopt_delayed_ack() or some other sockopts' process that accept two types of params does. Signed-off-by: Xin Long --- include/uapi/linux/sctp.h | 4 ++ net/sctp/socket.c | 177 -- 2 files changed, 175 insertions(+), 6 deletions(-) diff

[PATCHv2 net-next 0/5] sctp: fully support for dscp and flowlabel per transport

2018-07-02 Thread Xin Long
1/5 according to David's suggestion. - fix the param len check in sctp_s/getsockopt_peer_addr_params() in Patch 3/5 to guarantee that an old app built with old kernel headers could work on the newer kernel per Marcelo's point. Xin Long (5): ipv4: add __ip_queue_xmit() that supports tos pa

[PATCH net] sctp: fix the issue that pathmtu may be set lower than MINSEGMENT

2018-07-02 Thread Xin Long
Reported-by: syzbot+f0d9d7cba052f9344...@syzkaller.appspotmail.com Signed-off-by: Xin Long --- net/sctp/transport.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 445b7ef..ddfb687 100644 --- a/net/sctp/transport.c +++ b/

[PATCHv2 net-next 2/2] selftests: add a selftest for directed broadcast forwarding

2018-07-02 Thread Xin Long
As Ido's suggestion, this patch is to add a selftest for directed broadcast forwarding with vrf. Just note that it puts the h2 into the main route space, so that ping_test could get echo_reply. Signed-off-by: Xin Long --- .../selftests/net/forwarding/router_broadcast.sh | 142

[PATCHv2 net-next 1/2] route: add support for directed broadcast forwarding

2018-07-02 Thread Xin Long
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

[PATCHv2 net-next 0/2] route: add support and selftests for directed broadcast forwarding

2018-07-02 Thread Xin Long
ion. Xin Long (2): route: add support for directed broadcast forwarding selftests: add a selftest for directed broadcast forwarding include/linux/inetdevice.h | 1 + include/uapi/linux/ip.h| 1 + include/uapi/linux/netcon

[PATCHv3 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-28 Thread Xin Long
nks to Neil to make this clear. v1->v2: - add sctp_sk->reuse to separate it from the socket level version. v2->v3: - improve changelog according to Marcelo's suggestion. Acked-by: Neil Horman Signed-off-by: Xin Long --- include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.

Re: [PATCH net-next 3/5] sctp: add spp_ipv6_flowlabel and spp_dscp for sctp_paddrparams

2018-06-28 Thread Xin Long
On Tue, Jun 26, 2018 at 8:02 PM, 吉藤英明 wrote: > 2018-06-26 13:33 GMT+09:00 Xin Long : >> On Tue, Jun 26, 2018 at 12:31 AM, Marcelo Ricardo Leitner >> wrote: >>> Hi, >>> >>> On Tue, Jun 26, 2018 at 01:12:00AM +0900, 吉藤英明 wrote: >>>> Hi, >&g

Re: [PATCHv2 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-25 Thread Xin Long
On Mon, Jun 25, 2018 at 9:30 PM, Marcelo Ricardo Leitner wrote: > On Mon, Jun 25, 2018 at 10:06:46AM +0800, Xin Long wrote: >> This feature is actually already supported by sk->sk_reuse which can be >> set by socket level opt SO_REUSEADDR. But it's not working exactly as

Re: [PATCH net-next 1/5] ipv4: add __ip_queue_xmit() that supports tos param

2018-06-25 Thread Xin Long
On Mon, Jun 25, 2018 at 7:13 PM, Neil Horman wrote: > On Mon, Jun 25, 2018 at 04:26:54PM +0900, David Miller wrote: >> From: Xin Long >> Date: Mon, 25 Jun 2018 10:14:33 +0800 >> >> > +EXPORT_SYMBOL(__ip_queue_xmit); >> > + >> > +int ip_queue_x

Re: [PATCH net-next 3/5] sctp: add spp_ipv6_flowlabel and spp_dscp for sctp_paddrparams

2018-06-25 Thread Xin Long
an wrote: >> >> On Mon, Jun 25, 2018 at 04:31:26PM +0900, David Miller wrote: >> >> > From: Xin Long >> >> > Date: Mon, 25 Jun 2018 10:14:35 +0800 >> >> > >> >> > > struct sctp_paddrparams { >&

Re: [PATCH net-next] route: add support for directed broadcast forwarding

2018-06-25 Thread Xin Long
On Mon, Jun 25, 2018 at 5:09 PM, Ido Schimmel wrote: > Hi Xin, > > On Mon, Jun 25, 2018 at 10:45:08AM +0800, Xin Long wrote: >> This patch implements the feature described in rfc1812#section-5.3.5.2 >> and rfc2644. It allows the router to forward directed broadcast when &g

Re: [PATCH net-next] route: add support for directed broadcast forwarding

2018-06-25 Thread Xin Long
On Mon, Jun 25, 2018 at 10:45 AM, Xin Long wrote: > This patch implements the feature described in rfc1812#section-5.3.5.2 > and rfc2644. It allows the router to forward directed broadcast when > sysctl mc_forwarding is enabled. > > Note that this feature could be done by

Re: [PATCH net-next] route: add support for directed broadcast forwarding

2018-06-24 Thread Xin Long
On Mon, Jun 25, 2018 at 10:45 AM, Xin Long wrote: > This patch implements the feature described in rfc1812#section-5.3.5.2 > and rfc2644. It allows the router to forward directed broadcast when > sysctl mc_forwarding is enabled. > > Note that this feature could be done by

[PATCH net-next] route: add support for directed broadcast forwarding

2018-06-24 Thread Xin Long
necessary to implement it in the route rx path. 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 | 7 +++ net/ipv4/route.c | 6 +- 5 files changed, 15 insertions

[PATCH net-next 4/5] sctp: add support for setting flowlabel when adding a transport

2018-06-24 Thread Xin Long
sin6_flowinfo, and it needs to copy sin6_flowinfo from the primary addr. Signed-off-by: Xin Long --- net/sctp/associola.c | 12 ++-- net/sctp/socket.c| 5 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 16ecfbc

[PATCH net-next 5/5] sctp: check for ipv6_pinfo legal sndflow with flowlabel in sctp_v6_get_dst

2018-06-24 Thread Xin Long
The transport with illegal flowlabel should not be allowed to send packets. Other transport protocols already denies this. Signed-off-by: Xin Long --- net/sctp/ipv6.c | 9 + 1 file changed, 9 insertions(+) diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 772513d..d83ddc4 100644

[PATCH net-next 3/5] sctp: add spp_ipv6_flowlabel and spp_dscp for sctp_paddrparams

2018-06-24 Thread Xin Long
'| 0x10' or '|0x1' to mark flowlabel or dscp is set, so that their values could be set to 0. Signed-off-by: Xin Long --- include/uapi/linux/sctp.h | 4 ++ net/sctp/socket.c | 152 ++ 2 files changed, 156 insertions(+) diff --git a/include/uapi

[PATCH net-next 2/5] sctp: add support for dscp and flowlabel per transport

2018-06-24 Thread Xin Long
needs to set them before looking up route in get_dst. Note that it uses '& 0x10' to check if flowlabel is set and '& 0x1' (tos 1st bit is unused) to check if dscp is set by users, so that they could be set to 0 by sockopt in next patch. Signed-off-by: Xin Long --- include/linu

[PATCH net-next 1/5] ipv4: add __ip_queue_xmit() that supports tos param

2018-06-24 Thread Xin Long
which will be added in next patch. Signed-off-by: Xin Long --- include/net/ip.h | 2 ++ net/ipv4/ip_output.c | 13 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index 0d2281b..ca05b77 100644 --- a/include/net/ip.h +++ b/include/ne

[PATCH net-next 0/5] sctp: fully support for dscp and flowlabel per transport

2018-06-24 Thread Xin Long
Now dscp and flowlabel are set from sock when sending the packets, but being multi-homing, sctp also supports for dscp and flowlabel per transport, which is described in section 8.1.12 in RFC6458. Xin Long (5): ipv4: add __ip_queue_xmit() that supports tos param sctp: add support for dscp

[PATCHv2 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-24 Thread Xin Long
r. v1->v2: - add sctp_sk->reuse to separate it from the socket level version. Acked-by: Neil Horman Signed-off-by: Xin Long --- include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 62 -- 3 fil

[PATCH net] ipvlan: fix IFLA_MTU ignored on NEWLINK

2018-06-20 Thread Xin Long
f IFLA_MTU param is set when creating a ipvlan device. Fixes: 296d48568042 ("ipvlan: inherit MTU from master device") Reported-by: Jianlin Shi Signed-off-by: Xin Long --- drivers/net/ipvlan/ipvlan_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ip

[PATCH net] ipvlan: use ETH_MAX_MTU as max mtu

2018-06-18 Thread Xin Long
Similar to the fixes on team and bonding, this restores the ability to set an ipvlan device's mtu to anything higher than 1500. Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra") Signed-off-by: Xin Long --- drivers/net/ipvlan/ipvlan_main.c | 1 + 1 file

[PATCHv2 net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-06-13 Thread Xin Long
r. v1->v2: - add sctp_sk->reuse to separate it from the socket level version. Signed-off-by: Xin Long --- include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 62 -- 3 files changed, 57 insertions

Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-13 Thread Xin Long
On Thu, Jun 14, 2018 at 8:46 AM, Neil Horman wrote: > On Thu, Jun 14, 2018 at 07:37:02AM +0800, Xin Long wrote: >> Now sctp GSO uses skb_gro_receive() to append the data into head >> skb frag_list. However it actually only needs very few code from >> skb_gro_receive(). Bes

[PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames

2018-06-13 Thread Xin Long
it into the frags with the same size, which would break the border of sctp chunks. Signed-off-by: Xin Long --- include/net/sctp/structs.h | 5 + net/sctp/output.c | 28 ++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/include/net/sctp/structs.h b

[PATCH net] sctp: not allow transport timeout value less than HZ/5 for hb_timer

2018-06-04 Thread Xin Long
, as some users are still using small rto and no proper value was found for it yet. Reported-by: syzbot+3dcd59a1f907245f8...@syzkaller.appspotmail.com Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long --- net/sctp/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH net] sctp: not allow to set rto_min with a value below 200 msecs

2018-06-04 Thread Xin Long
On Mon, Jun 4, 2018 at 4:34 PM, Dmitry Vyukov wrote: > On Tue, May 29, 2018 at 7:45 PM, Xin Long wrote: >> On Wed, May 30, 2018 at 1:06 AM, Marcelo Ricardo Leitner >> wrote: >>> On Tue, May 29, 2018 at 12:03:46PM -0400, Neal Cardwell wrote: >>>> On Tue, May

Re: [PATCH net] sctp: not allow to set rto_min with a value below 200 msecs

2018-05-29 Thread Xin Long
On Wed, May 30, 2018 at 1:06 AM, Marcelo Ricardo Leitner wrote: > On Tue, May 29, 2018 at 12:03:46PM -0400, Neal Cardwell wrote: >> On Tue, May 29, 2018 at 11:45 AM Marcelo Ricardo Leitner < >> marcelo.leit...@gmail.com> wrote: >> > - patch2 - fix rtx attack vector >> >- Add the floor value

[PATCH net] sctp: not allow to set rto_min with a value below 200 msecs

2018-05-25 Thread Xin Long
...@syzkaller.appspotmail.com Suggested-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 1 + net/sctp/socket.c| 10 +++--- net/sctp/sysctl.c| 3 ++- 3 files changed, 10 insertions(+), 4 deleti

Re: INFO: rcu detected stall in corrupted

2018-05-24 Thread Xin Long
nline] >> sctp_do_sm+0x596/0x7160 net/sctp/sm_sideeffect.c:1191 >> sctp_generate_heartbeat_event+0x218/0x450 net/sctp/sm_sideeffect.c:406 >> call_timer_fn+0x230/0x940 kernel/time/timer.c:1326 >> >> >> Some kind of infinite loop. >> >&

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-23 Thread Xin Long
On Tue, May 22, 2018 at 7:51 PM, Neil Horman <nhor...@tuxdriver.com> wrote: > On Tue, May 22, 2018 at 03:07:57PM +0800, Xin Long wrote: >> On Mon, May 21, 2018 at 9:48 PM, Neil Horman <nhor...@tuxdriver.com> wrote: >> > On Mon, May 21, 2018 at 02:16:56PM +0200, Micha

Re: [PATCH net] sctp: fix the issue that flags are ignored when using kernel_connect

2018-05-23 Thread Xin Long
On Wed, May 23, 2018 at 1:40 AM, David Miller <da...@davemloft.net> wrote: > From: Xin Long <lucien@gmail.com> > Date: Sun, 20 May 2018 16:39:10 +0800 > >> Now sctp uses inet_dgram_connect as its proto_ops .connect, and the flags >> param can't be pas

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-22 Thread Xin Long
:04PM -0300, Marcelo Ricardo Leitner wrote: >> >> On Sun, May 20, 2018 at 08:50:59PM -0400, Neil Horman wrote: >> >>> On Sat, May 19, 2018 at 03:44:40PM +0800, Xin Long wrote: >> >>>> This feature is actually already supported by sk->sk_reuse

Re: [PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-21 Thread Xin Long
On Mon, May 21, 2018 at 9:54 AM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Sun, May 20, 2018 at 08:50:59PM -0400, Neil Horman wrote: >> On Sat, May 19, 2018 at 03:44:40PM +0800, Xin Long wrote: >> > This feature is actually already supported b

[PATCH net] sctp: fix the issue that flags are ignored when using kernel_connect

2018-05-20 Thread Xin Long
better than with inet_dgram_connect. Suggested-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sctp.h | 2 ++ net/sctp/ipv6.c | 2 +- net/sctp/protocol.c | 2 +- net/sctp/socket.

Re: INFO: rcu detected stall in is_bpf_text_address

2018-05-20 Thread Xin Long
On Sat, May 19, 2018 at 11:57 PM, Eric Dumazet wrote: > SCTP experts, please take a look. > > On 05/19/2018 08:55 AM, syzbot wrote: >> Hello, >> >> syzbot found the following crash on: >> >> HEAD commit:73fcb1a370c7 Merge branch 'akpm' (patches from Andrew) >> git

[PATCH net-next] sctp: add support for SCTP_REUSE_PORT sockopt

2018-05-19 Thread Xin Long
eeeded when it is being enabled. "It should be noted that the behavior of the socket-level socket option to reuse ports and/or addresses for SCTP sockets is unspecified", so it leaves SO_REUSEADDR as is for the compatibility. Signed-off-by: Xin Long <lucien@gmail.com> --- inc

Re: INFO: rcu detected stall in sctp_packet_transmit

2018-05-16 Thread Xin Long
On Wed, May 16, 2018 at 6:53 PM, Dmitry Vyukov <dvyu...@google.com> wrote: > On Wed, May 16, 2018 at 12:44 PM, Xin Long <lucien@gmail.com> wrote: >> On Wed, May 16, 2018 at 4:11 PM, syzbot >> <syzbot+ff0b569fb5111dcd1...@syzkaller.appspotmail.com> wrote

Re: INFO: rcu detected stall in sctp_packet_transmit

2018-05-16 Thread Xin Long
On Wed, May 16, 2018 at 4:11 PM, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:961423f9fcbc Merge branch 'sctp-Introduce-sctp_flush_ctx' > git tree: net-next > console output:

Re: KMSAN: uninit-value in __sctp_v6_cmp_addr

2018-05-16 Thread Xin Long
v6.c:580 Pls check if the testing kernel has this commit: commit d625329b06e46bd20baf9ee40847d11982569204 Author: Xin Long <lucien@gmail.com> Date: Thu Apr 26 14:13:57 2018 +0800 sctp: handle two v4 addrs comparison in sctp_inet6_cmp_addr Thanks. > sctp_inet6_cmp_addr+0x3dc/0x4

Re: INFO: rcu detected stall in kfree_skbmem

2018-05-14 Thread Xin Long
On Mon, May 14, 2018 at 9:34 PM, Neil Horman wrote: > On Fri, May 11, 2018 at 12:00:38PM +0200, Dmitry Vyukov wrote: >> On Mon, Apr 30, 2018 at 8:09 PM, syzbot >> wrote: >> > Hello, >> > >> > syzbot found the following

[PATCH net] sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg

2018-05-10 Thread Xin Long
use-after-free crash happened on this err path, where it shouldn't call sctp_chunk_put. This patch simply removes this call. Fixes: 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too") Reported-by: syzbot+141d898c5f24489db...@syzkaller.appspotmail.com Signed-off-by: Xin Long &

Re: KASAN: use-after-free Read in sctp_do_sm

2018-05-08 Thread Xin Long
On Tue, May 8, 2018 at 9:58 PM, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:f142f08bf7ec Fix typo in comment. > git tree: upstream > console output:

Re: [PATCH net] sctp: delay the authentication for the duplicated cookie-echo chunk

2018-05-05 Thread Xin Long
On Sat, May 5, 2018 at 6:33 AM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Fri, May 04, 2018 at 05:05:10PM +0800, Xin Long wrote: >> Now sctp only delays the authentication for the normal cookie-echo >> chunk by setting chunk->auth_chunk

[PATCHv2 net] sctp: delay the authentication for the duplicated cookie-echo chunk

2018-05-05 Thread Xin Long
rom sctp_sf_authenticate() and define sctp_auth_chunk_verify() used for all the places that do the delayed authentication. v1->v2: fix the typo in changelog as Marcelo noticed. Acked-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- ne

[PATCH net] sctp: delay the authentication for the duplicated cookie-echo chunk

2018-05-04 Thread Xin Long
ate() and define sctp_auth_chunk_verify() used for all the places that do the delayed authentication. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/associola.c| 30 - net/sctp/sm_statefuns.c | 86 ++--- 2 files ch

Re: non-blocking connect for kernel SCTP sockets

2018-05-02 Thread Xin Long
On Wed, May 2, 2018 at 5:06 PM, Michal Kubecek wrote: > Hello, > > while investigating a bug, we noticed that DLM tries to connect an SCTP > socket in non-blocking mode using > > result = sock->ops->connect(sock, (struct sockaddr *), addr_len, >

[PATCH net] sctp: fix the issue that the cookie-ack with auth can't get processed

2018-05-01 Thread Xin Long
m excessive queueing") Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/inqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c index 23ebc53..eb93ffe 100644 --- a/net/sctp/inqueue.c +++ b/net/sctp/inqueue.c @@ -

[PATCH net] sctp: use the old asoc when making the cookie-ack chunk in dupcook_d

2018-05-01 Thread Xin Long
, like when auth is enabled for cookie-ack, the chunk can not be set with auth, and it will definitely be dropped by peer. This issue is there since very beginning, and we fix it by using the old asoc instead. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/sm_statefuns.c | 2 +-

[PATCH net] sctp: init active key for the new asoc in dupcook_a and dupcook_b

2018-05-01 Thread Xin Long
can even be caused by this, as after Commit 1b1e0bc99474 ("sctp: add refcnt support for sh_key"), sctp needs to hold the shkey when making control chunks. Fixes: 1b1e0bc99474 ("sctp: add refcnt support for sh_key") Reported-by: Jianwen Ji <j...@redhat.com> Signe

Re: [PATCH net-next 00/13] sctp: refactor MTU handling

2018-04-27 Thread Xin Long
- > net/sctp/socket.c| 43 ++- > net/sctp/transport.c | 37 ++++++- > 8 files changed, 105 insertions(+), 134 deletions(-) > > -- > 2.14.3 > Series Reviewed-by: Xin Long <lucien@gmail.com>

Re: [PATCH net-next] selftests: pmtu: Minimum MTU for vti6 is 68

2018-04-27 Thread Xin Long
_addr} key 10 > mtu="$(link_get_mtu "${ns_a}" vti6_a)" > ${ns_a} ip link del vti6_a > -- > 2.15.1 > Reviewed-by: Xin Long <lucien@gmail.com>

[PATCH net] sctp: clear the new asoc's stream outcnt in sctp_stream_update

2018-04-26 Thread Xin Long
he one fixed in Commit 79d0895140e9 ("sctp: fix error path in sctp_stream_init") when freeing this asoc later. This fix is to clear this outcnt in sctp_stream_update. Fixes: f952be79cebd ("sctp: introduce struct sctp_stream_out_ext") Reported-by: Jianwen Ji <j...@redhat

[PATCH net] sctp: handle two v4 addrs comparison in sctp_inet6_cmp_addr

2018-04-26 Thread Xin Long
do not check port in sctp_inet6_cmp_addr") Reported-by: syzbot+cd494c1dd681d4d93...@syzkaller.appspotmail.com Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/ipv6.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 2e3f7b7..4224711

[PATCH net-next] sctp: remove the unused sctp_assoc_is_match function

2018-04-25 Thread Xin Long
After Commit 4f0087812648 ("sctp: apply rhashtable api to send/recv path"), there's no place using sctp_assoc_is_match, so remove it. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 4 net/sctp/associola.c | 25 --

Re: [PATCH net-next] sctp: fix identification of new acks for SFR-CACC

2018-04-25 Thread Xin Long
_path->cacc. > - changeover_active) > - > transport->cacc.cacc_saw_newack > - = 1; > - } > - > list_add_tail(>transmitted_list, > >sacked); > } else { > -- > 2.14.3 > Reviewed-by: Xin Long <lucien@gmail.com>

Re: [PATCH net-next] sctp: fix const parameter violation in sctp_make_sack

2018-04-25 Thread Xin Long
* Until the next sack > */ > - if (++aptr->peer.sack_generation == 0) { > + if (++asoc->peer.sack_generation == 0) { > list_for_each_entry(trans, >peer.transport_addr_list, > transports) >

[PATCHv2 net] team: fix netconsole setup over team

2018-04-24 Thread Xin Long
m: cleanup netpoll clode") Reported-by: João Avelino Bellomo Filho <jbell...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/team/team.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/team/team.c b/dr

Re: [PATCH net] team: check team dev npinfo when adding a port only

2018-04-23 Thread Xin Long
On Mon, Apr 23, 2018 at 1:40 PM, Xin Long <lucien@gmail.com> wrote: > On Mon, Apr 23, 2018 at 12:20 PM, kbuild test robot <l...@intel.com> wrote: >> Hi Xin, >> >> Thank you for the patch! Yet something to improve: >> >> [auto build test ERROR on net

Re: KASAN: slab-out-of-bounds Read in __sctp_v6_cmp_addr

2018-04-23 Thread Xin Long
On Mon, Apr 23, 2018 at 9:02 AM, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 83beed7b2b26f232d782127792dd0cd4362fdc41 (Fri Apr 20 17:56:32 2018 +) > Merge branch 'fixes' of >

Re: [PATCH net] team: check team dev npinfo when adding a port only

2018-04-22 Thread Xin Long
On Mon, Apr 23, 2018 at 12:20 PM, kbuild test robot <l...@intel.com> wrote: > Hi Xin, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on net/master] > > url: > https://github.com/0day-ci/linux/commits/Xin-Long/team-check-team-dev-

[PATCH net] bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave

2018-04-22 Thread Xin Long
;bonding: sync netpoll code with bridge") Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/bonding/bond_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b7b1130..718e491 100644 --- a

[PATCH net] team: check team dev npinfo when adding a port only

2018-04-22 Thread Xin Long
, like before that cleanup. Fixes: 0fb52a27a04a ("team: cleanup netpoll clode") Reported-by: João Avelino Bellomo Filho <jbell...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/team/team.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletion

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-18 Thread Xin Long
On Wed, Apr 18, 2018 at 9:33 AM, Marcelo Ricardo Leitner wrote: > On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: >> On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: >> > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: >> >> Now

[PATCHv2 net] sctp: do not check port in sctp_inet6_cmp_addr

2018-04-12 Thread Xin Long
ine __sctp_v6_cmp_addr to do the common address comparison used for both pf and af v6 cmp_addr. Fixes: 40b4f0fd74e4 ("sctp: lack the check for ports in sctp_v6_cmp_addr") Reported-by: Jianwen Ji <j...@redhat.com> Signed-off-by: Xin Long <lucien

Re: [PATCH net] sctp: do not check port in sctp_inet6_cmp_addr

2018-04-11 Thread Xin Long
On Wed, Apr 11, 2018 at 10:59 PM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Wed, Apr 11, 2018 at 10:36:07AM -0400, Neil Horman wrote: >> On Wed, Apr 11, 2018 at 08:58:05PM +0800, Xin Long wrote: >> > pf->cmp_addr() is called before bindi

[PATCH net] sctp: do not check port in sctp_inet6_cmp_addr

2018-04-11 Thread Xin Long
fd74e4 ("sctp: lack the check for ports in sctp_v6_cmp_addr") Reported-by: Jianwen Ji <j...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/ipv6.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/net/sctp/ipv6.c

Re: [PATCH net] ip_gre: clear feature flags when incompatible o_flags are set

2018-04-10 Thread Xin Long
NETIF_F_LLTX; > + } else { > + dev->hw_features &= ~NETIF_F_GSO_SOFTWARE; > + dev->features &= ~(NETIF_F_LLTX | NETIF_F_GSO_SOFTWARE); > } > } > > -- > 2.16.2 > Reviewed-by: Xin Long <lucien@gmail.com>

[PATCH net] route: check sysctl_fib_multipath_use_neigh earlier than hash

2018-04-01 Thread Xin Long
alive routes with the l3/l4 hash. Fixes: a6db4494d218 ("net: ipv4: Consider failed nexthops in multipath routes") Reported-by: Jianlin Shi <ji...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/ipv4/fib_semantics.c | 20 +++- 1 file chan

[PATCH net] sctp: remove unnecessary asoc in sctp_has_association

2018-03-26 Thread Xin Long
ssociation to bool, and does the same for it's caller sctp_endpoint_is_peeled_off. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 8 net/sctp/endpointola.c | 8 net/sctp/input.c | 13 ++--- 3 files changed, 14 i

[PATCH net] team: move dev_mc_sync after master_upper_dev_link in team_port_add

2018-03-25 Thread Xin Long
: cb41c997d444 ("team: team should sync the port's uc/mc addrs when add a port") Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/team/team.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/team/team.c b/drivers/net/team/team

[PATCH net 2/3] bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave

2018-03-25 Thread Xin Long
s if (mode == BOND_MODE_8023AD) into if (!bond_uses_primary) clause as an improvement. Note team driver also has this issue, I will fix it in another patch. Fixes: 1f718f0f4f97 ("bonding: populate neighbour's private on enslave") Reported-by: Beniamino Galvani <bgalv...@redhat.com&g

[PATCH net 3/3] bonding: process the err returned by dev_set_allmulti properly in bond_enslave

2018-03-25 Thread Xin Long
When dev_set_promiscuity(1) succeeds but dev_set_allmulti(1) fails, dev_set_promiscuity(-1) should be done before going to the err path. Otherwise, dev->promiscuity will leak. Fixes: 7e1a1ac1fbaa ("bonding: Check return of dev_set_promiscuity/allmulti") Signed-off-by: Xin

[PATCH net 1/3] bonding: fix the err path for dev hwaddr sync in bond_enslave

2018-03-25 Thread Xin Long
Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/bonding/bond_main.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c669554..0c299de 100644 --- a/drivers/net/bonding/bond_main.c +

[PATCH net 0/3] bonding: a bunch of fixes for dev hwaddr sync in bond_enslave

2018-03-25 Thread Xin Long
This patchset is mainly to fix a crash when adding vlan as slave of bond which is also the parent link in patch 2/3, and also fix some err process problems in bond_enslave in patch 1/3 and 3/3. Xin Long (3): bonding: fix the err path for dev hwaddr sync in bond_enslave bonding: move

Re: [PATCH net-next 1/5] sctp: add refcnt support for sh_key

2018-03-14 Thread Xin Long
On Wed, Mar 14, 2018 at 9:59 PM, Neil Horman <nhor...@tuxdriver.com> wrote: > On Wed, Mar 14, 2018 at 07:05:30PM +0800, Xin Long wrote: >> With refcnt support for sh_key, chunks auth sh_keys can be decided >> before enqueuing it. Changing the active key later will not affect

[PATCH net-next 2/5] sctp: add support for SCTP AUTH Information for sendmsg

2018-03-14 Thread Xin Long
tsn to indicate if this option is set and sinfo->sinfo_ssn to save the shkey ID which can be 0. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 1 + include/uapi/linux/sctp.h | 14 +- net/sctp/chunk.c | 11 ++- net/sctp/socket.c

[PATCH net-next 4/5] sctp: add SCTP_AUTH_FREE_KEY type for AUTHENTICATION_EVENT

2018-03-14 Thread Xin Long
this notification, they could do DEL_KEY sockopt to remove this shkey, and also tell the peer that this key won't be used in any chunk thoroughly from now on, then the peer can remove it as well safely. Signed-off-by: Xin Long <lucien@gmail.com> --- include/uapi/linux/sctp.h | 6 +- ne

[PATCH net-next 5/5] sctp: add SCTP_AUTH_NO_AUTH type for AUTHENTICATION_EVENT

2018-03-14 Thread Xin Long
as that of SCTP_ADAPTATION_INDICATION. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/command.h | 1 + include/uapi/linux/sctp.h | 1 + net/sctp/sm_sideeffect.c | 13 + net/sctp/sm_statefuns.c| 43 +-- 4 files chang

<    1   2   3   4   5   6   7   8   9   10   >