Re: [PATCH net] sctp: Avoid out-of-bounds reads from address storage

2017-08-23 Thread Xin Long
0 00 00 00 fc fc fc fc fb fb fb fb fb fb > fb fb > [ 2327.397031]^ > [ 2327.401792] 881be8779880: fc fc fc fc fb fb fb fb fb fb fb fb fc fc > fc fc > [ 2327.409850] 881be8779900: 00 00 00 00 00 04 fc fc fc fc fc fc 00 00 > 00 00 > [ 232

[PATCH net-next] ipv4: do metrics match when looking up and deleting a route

2017-08-22 Thread Xin Long
looking up and deleting one route. Reported-by: Thomas Haller <thal...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Hannes Frederic Sowa <han...@stressinduktion.org> --- net/ipv4/fib_lookup.h| 1 + net/ipv4/fib_semantics.c | 34 ++

[PATCH net 1/2] netfilter: ipvs: fix the issue that sctp_conn_schedule drops non-INIT packet

2017-08-19 Thread Xin Long
means ipvs will accept it without creating a conn for it, just like what it does for tcp. Fixes: 5e26b1b3abce ("ipvs: support scheduling inverse and icmp SCTP packets") Reported-by: Li Shuang <shu...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/netfilter/ipvs/i

[PATCH net 2/2] netfilter: ipvs: do not create conn for ABORT packet in sctp_conn_schedule

2017-08-19 Thread Xin Long
There's no reason for ipvs to create a conn for an ABORT packet even if sysctl_sloppy_sctp is set. This patch is to accept it without creating a conn, just as ipvs does for tcp's RST packet. Signed-off-by: Xin Long <lucien@gmail.com> --- net/netfilter/ipvs/ip_vs_proto_sctp.c | 3 ++-

[PATCH net 0/2] netfilter: ipvs: some fixes in sctp_conn_schedule

2017-08-19 Thread Xin Long
Patch 1/2 fixes the regression introduced by commit 5e26b1b3abce. Patch 2/2 makes ipvs not create conn for sctp ABORT packet. Xin Long (2): netfilter: ipvs: fix the issue that sctp_conn_schedule drops non-INIT packet netfilter: ipvs: do not create conn for ABORT packet

[PATCHv2 net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-17 Thread Xin Long
these panics by setting it with an ipt_entry obj with all members = 0. Note that this issue has been there since the very beginning. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sched/act_ipt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sched/act_ipt.c b/net

Re: [PATCH net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-17 Thread Xin Long
On Thu, Aug 17, 2017 at 10:33 PM, Pablo Neira Ayuso <pa...@netfilter.org> wrote: > On Thu, Aug 17, 2017 at 12:02:20PM +0200, Pablo Neira Ayuso wrote: >> On Wed, Aug 16, 2017 at 08:39:44PM +1200, Xin Long wrote: >> > On Wed, Aug 9, 2017 at 7:33 AM, Cong Wang <xiyo

Re: [PATCH net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-17 Thread Xin Long
On Thu, Aug 17, 2017 at 5:57 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Wed, Aug 16, 2017 at 1:39 AM, Xin Long <lucien@gmail.com> wrote: >> On Wed, Aug 9, 2017 at 7:33 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >>> On Mon, Aug 7, 2017 at 7:3

Re: [PATCH net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-16 Thread Xin Long
On Wed, Aug 9, 2017 at 7:33 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Mon, Aug 7, 2017 at 7:33 PM, Xin Long <lucien@gmail.com> wrote: >> On Tue, Aug 8, 2017 at 9:15 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >>> This looks like a completely

[PATCH net-next 14/14] sctp: fix some indents in sm_make_chunk.c

2017-08-10 Thread Xin Long
functions' defination in sm_make_chunk.c. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sm.h| 158 ++--- net/sctp/sm_make_chunk.c | 348 +++ 2 files changed, 249 insertions(+), 257 deletions(-) diff

[PATCH net-next 11/14] sctp: remove the unused typedef sctp_sm_command_t

2017-08-10 Thread Xin Long
Remove this typedef including the struct, there is even no places using it. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sm.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 9af64b9..3ca75a6 100644 --- a/i

[PATCH net-next 12/14] sctp: remove the typedef sctp_sm_table_entry_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_sm_table_entry_t, and replace with struct sctp_sm_table_entry in the places where it's using this typedef. It is also to fix some indents. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sm.h| 6 +++--- net/sctp/sm_sideef

[PATCH net-next 13/14] sctp: remove the typedef sctp_disposition_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_disposition_t, and replace with enum sctp_disposition in the places where it's using this typedef. It's also to fix the indent for many functions' defination. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sm.h| 19 +- ne

[PATCH net-next 09/14] sctp: remove the typedef sctp_arg_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_arg_t, and replace with union sctp_arg in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/command.h | 26 +- net/sctp/sm_statefuns.c| 2 +- 2 files chang

[PATCH net-next 10/14] sctp: remove the typedef sctp_verb_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_verb_t, and replace with enum sctp_verb in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/command.h | 10 +- net/sctp/sm_statefuns.c| 2 +- 2 files changed, 6 insertions

[PATCH net-next 05/14] sctp: remove the typedef sctp_dbg_objcnt_entry_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_dbg_objcnt_entry_t, and replace with struct sctp_dbg_objcnt_entry in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 4 ++-- net/sctp/objcnt.c | 2 +- 2 files chan

[PATCH net-next 08/14] sctp: remove the typedef sctp_cmd_seq_t

2017-08-10 Thread Xin Long
sctp_disposition_t in the later patch. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/command.h | 14 +-- include/net/sctp/sm.h | 2 +- net/sctp/probe.c | 2 +- net/sctp/sm_sideeffect.c | 54 ++-- net/sctp/sm_statefuns.c

[PATCH net-next 06/14] sctp: remove the typedef sctp_socket_type_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_socket_type_t, and replace with enum sctp_socket_type in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sctp.h| 3 ++- include/net/sctp/structs.h | 6 +++--- net/sctp/socket.c

[PATCH net-next 04/14] sctp: remove the typedef sctp_cmsgs_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_cmsgs_t, and replace with struct sctp_cmsgs in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 4 ++-- net/sctp/socket.c | 9 + 2 files changed, 7 insertions

[PATCH net-next 07/14] sctp: remove the typedef sctp_cmd_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_cmd_t, and replace with enum sctp_cmd in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/command.h | 14 +++--- net/sctp/sm_sideeffect.c | 2 +- 2 files changed, 8 insertions

[PATCH net-next 03/14] sctp: remove the typedef sctp_endpoint_type_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_endpoint_type_t, and replace with enum sctp_endpoint_type in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH net-next 01/14] sctp: remove the unused typedef sctp_packet_phandler_t

2017-08-10 Thread Xin Long
Remove this function typedef, there is even no places using it. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index fbe6e81..73e9509 100644 --- a/i

[PATCH net-next 02/14] sctp: remove the typedef sctp_sender_hb_info_t

2017-08-10 Thread Xin Long
This patch is to remove the typedef sctp_sender_hb_info_t, and replace with struct sctp_sender_hb_info in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.

[PATCH net-next 00/14] sctp: remove typedefs from structures part 6

2017-08-10 Thread Xin Long
, reodering some local params, especially in the last 2 patches. Xin Long (14): sctp: remove the unused typedef sctp_packet_phandler_t sctp: remove the typedef sctp_sender_hb_info_t sctp: remove the typedef sctp_endpoint_type_t sctp: remove the typedef sctp_cmsgs_t sctp: remove the typedef

[PATCHv2 net] net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target

2017-08-09 Thread Xin Long
ables: add context to know if extension runs from nft_compat") Suggested-by: Cong Wang <xiyou.wangc...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sched/act_ipt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/act_ipt.c b/net/sch

[PATCHv3 net] net: sched: set xt_tgchk_param par.net properly in ipt_init_target

2017-08-08 Thread Xin Long
_id != xt_net_id, so fix it by also passing net_id to __tcf_ipt_init. v2->v3: Missed the fixes tag, so add it. Fixes: ecb2421b5ddf ("netfilter: add and use nf_ct_netns_get/put") Reported-by: Jaroslav Aster <jas...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> -

Re: [PATCHv2 net] net: sched: set xt_tgchk_param par.net properly in ipt_init_target

2017-08-08 Thread Xin Long
fix >> it by also passing net_id to __tcf_ipt_init. >> >>Reported-by: Jaroslav Aster <jas...@redhat.com> >>Signed-off-by: Xin Long <lucien@gmail.com> > > Fixes what? You need to have "Fixes" tag for net patches. Fixes: ecb2421b5ddf ("netfilter: add and use nf_ct_netns_get/put") Thanks, I will repost

Re: [PATCH net-next 03/14] sctp: remove the typedef sctp_scope_policy_t

2017-08-07 Thread Xin Long
On Mon, Aug 7, 2017 at 9:28 PM, David Laight <david.lai...@aculab.com> wrote: > From: Xin Long >> Sent: 05 August 2017 13:00 >> This patch is to remove the typedef sctp_scope_policy_t and keep >> it's members as an anonymous enum. >> >> It is also to define S

Re: [PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-07 Thread Xin Long
On Mon, Aug 7, 2017 at 11:39 AM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Sun, Aug 06, 2017 at 06:14:39PM +1200, Xin Long wrote: >> On Sun, Aug 6, 2017 at 5:08 AM, Marcelo Ricardo Leitner >> <marcelo.leit...@gmail.com> wrote: >> > On S

Re: [PATCH net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-07 Thread Xin Long
On Tue, Aug 8, 2017 at 9:15 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > (Cc'ing netfilter and Jamal) > > On Sat, Aug 5, 2017 at 4:35 AM, Xin Long <lucien@gmail.com> wrote: >> As we know in some target's checkentry it may dereference par.entryinfo >> to c

Re: [PATCH net] net: sched: set xt_tgchk_param par.nft_compat with false in ipt_init_target

2017-08-07 Thread Xin Long
On Tue, Aug 8, 2017 at 9:03 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Sat, Aug 5, 2017 at 4:32 AM, Xin Long <lucien@gmail.com> wrote: >> Commit 55917a21d0cc ("netfilter: x_tables: add context to know if >> extension runs from nft_compat&

[PATCHv2 net] net: sched: set xt_tgchk_param par.net properly in ipt_init_target

2017-08-07 Thread Xin Long
_id != xt_net_id, so fix it by also passing net_id to __tcf_ipt_init. Reported-by: Jaroslav Aster <jas...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sched/act_ipt.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/net/sched/

Re: [PATCH net] net: sched: set xt_tgchk_param par.net properly in ipt_init_target

2017-08-07 Thread Xin Long
On Tue, Aug 8, 2017 at 9:00 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Sat, Aug 5, 2017 at 1:48 AM, Xin Long <lucien@gmail.com> wrote: >> -static int __tcf_ipt_init(struct tc_action_net *tn, struct nlattr *nla, >> +static int __tcf_ipt_init(struct n

Re: [PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-06 Thread Xin Long
On Sun, Aug 6, 2017 at 5:08 AM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Sat, Aug 05, 2017 at 08:31:09PM +0800, Xin Long wrote: >> Chen Wei found a kernel call trace when modprobe sctp_probe with >> bufsize set with a huge value. >> >> It

[PATCH net] sctp: use __GFP_NOWARN for sctpw.fifo allocation

2017-08-05 Thread Xin Long
, this patch is just to fail silently and return ret, just as commit 0ccc22f425e5 ("sit: use __GFP_NOWARN for user controlled allocation") did. Reported-by: Chen Wei <weic...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/probe.c | 2 +- 1 file chan

[PATCH net-next 14/14] sctp: remove the typedef sctp_subtype_t

2017-08-05 Thread Xin Long
sctp_disposition_t in later patch. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 18 ++-- include/net/sctp/sm.h| 13 +-- net/sctp/associola.c | 2 +- net/sctp/debug.c | 8 +- net/sctp/endpointola.c | 2 +- net/sctp/primi

[PATCH net-next 13/14] sctp: remove the typedef sctp_event_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_event_t, and replace with enum sctp_event in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 6 ++ include/net/sctp/sm.h| 12 +--- net/sctp/primi

[PATCH net-next 12/14] sctp: remove the typedef sctp_event_timeout_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_event_timeout_t, and replace with enum sctp_event_timeout in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/command.h | 4 ++-- include/net/sctp/constants.h | 8 ne

[PATCH net-next 11/14] sctp: remove the typedef sctp_event_other_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_event_other_t, and replace with enum sctp_event_other in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH net-next 10/14] sctp: remove the typedef sctp_event_primitive_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_event_primitive_t, and replace with enum sctp_event_primitive in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH net-next 09/14] sctp: remove the typedef sctp_state_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_state_t, and replace with enum sctp_state in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/command.h | 4 ++-- include/net/sctp/constants.h | 4 ++-- include/net/sctp/sctp.h

[PATCH net-next 05/14] sctp: remove the typedef sctp_transport_cmd_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_transport_cmd_t, and replace with enum sctp_transport_cmd in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 4 ++-- include/net/sctp/structs.h | 7 --- net/sctp/assoc

[PATCH net-next 08/14] sctp: remove the typedef sctp_ierror_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_ierror_t, and replace with enum sctp_ierror in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 5 ++--- net/sctp/sm_make_chunk.c | 23 --- ne

[PATCH net-next 07/14] sctp: remove the typedef sctp_xmit_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_xmit_t, and replace with enum sctp_xmit in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 4 +-- include/net/sctp/structs.h | 9 --- net/sctp/output.c

[PATCH net-next 04/14] sctp: remove the typedef sctp_scope_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_scope_t, and replace with enum sctp_scope in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 4 ++-- include/net/sctp/sctp.h | 4 ++-- include/net/sctp/structs.h

[PATCH net-next 00/14] sctp: remove typedefs from structures part 5

2017-08-05 Thread Xin Long
as the part 1-4, No any code's logic would be changed in these patches, only cleaning up. Xin Long (14): sctp: remove the typedef sctp_lower_cwnd_t sctp: remove the typedef sctp_retransmit_reason_t sctp: remove the typedef sctp_scope_policy_t sctp: remove the typedef sctp_scope_t sctp: remove

[PATCH net-next 01/14] sctp: remove the typedef sctp_lower_cwnd_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_lower_cwnd_t, and replace with enum sctp_lower_cwnd in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 4 ++-- include/net/sctp/structs.h | 3 ++- net/sctp/trans

[PATCH net-next 06/14] sctp: remove the typedef sctp_sock_state_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_sock_state_t, and replace with enum sctp_sock_state in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 6 +++--- include/net/sctp/sctp.h | 3 ++- 2 files chan

[PATCH net-next 03/14] sctp: remove the typedef sctp_scope_policy_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_scope_policy_t and keep it's members as an anonymous enum. It is also to define SCTP_SCOPE_POLICY_MAX to replace the num 3 in sysctl.c to make codes clear. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 6 -

[PATCH net-next 02/14] sctp: remove the typedef sctp_retransmit_reason_t

2017-08-05 Thread Xin Long
This patch is to remove the typedef sctp_retransmit_reason_t, and replace with enum sctp_retransmit_reason in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h | 4 ++-- include/net/sctp/structs.h | 4 ++-- ne

[PATCH net] net: sched: fix NULL pointer dereference when action calls some targets

2017-08-05 Thread Xin Long
these panics by setting it with an ipt_entry obj with all members 0. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sched/act_ipt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 7c4816b..0f09f70 100644 --- a/net

[PATCH net] net: sched: set xt_tgchk_param par.nft_compat with false in ipt_init_target

2017-08-05 Thread Xin Long
lt in some target's checkentry. This patch is to set par.nft_compat with false in ipt_init_target. Fixes: 55917a21d0cc ("netfilter: x_tables: add context to know if extension runs from nft_compat") Signed-off-by: Xin Long <lucien@gmail.com> --- net/sched/act_ipt.c | 1 + 1 file cha

[PATCH net] net: sched: set xt_tgchk_param par.net properly in ipt_init_target

2017-08-05 Thread Xin Long
Signed-off-by: Xin Long <lucien@gmail.com> --- net/sched/act_ipt.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 36f0ced..bb06d2ed 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c @@ -36,8 +36

[PATCH net-next 14/14] sctp: remove the typedef sctp_auth_chunk_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_auth_chunk_t, and replace with struct sctp_auth_chunk in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 4 ++-- ne

[PATCH net-next 11/14] sctp: remove the typedef sctp_addiphdr_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_addiphdr_t, and replace with struct sctp_addiphdr in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- ne

[PATCH net-next 12/14] sctp: remove the typedef sctp_addip_chunk_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_addip_chunk_t, and replace with struct sctp_addip_chunk in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 ++-- net/sctp/input.c | 2 +- net/sctp/sm_make_chunk.

[PATCH net-next 13/14] sctp: remove the typedef sctp_authhdr_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_authhdr_t, and replace with struct sctp_authhdr in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- ne

[PATCH net-next 10/14] sctp: remove the typedef sctp_addip_param_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_addip_param_t, and replace with struct sctp_addip_param in the places where it's using this typedef. It is to use sizeof(variable) instead of sizeof(type), and also fix some indent problems. Signed-off-by: Xin Long <lucien@gmail.com> --- i

[PATCH net-next 07/14] sctp: remove the typedef sctp_ecne_chunk_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_ecne_chunk_t, and replace with struct sctp_ecne_chunk in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 4 ++-- net/sctp/sm_statefuns.c | 4 ++-- 2 files changed, 4 insertions

[PATCH net-next 08/14] sctp: remove the typedef sctp_cwrhdr_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_cwrhdr_t, and replace with struct sctp_cwrhdr in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- ne

[PATCH net-next 09/14] sctp: remove the typedef sctp_cwr_chunk_t

2017-08-03 Thread Xin Long
Remove this typedef including the struct, there is even no places using it. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 3c8c418..2a97639 100644 --- a/i

[PATCH net-next 06/14] sctp: remove the typedef sctp_ecnehdr_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_ecnehdr_t, and replace with struct sctp_ecnehdr in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- ne

[PATCH net-next 05/14] sctp: remove the typedef sctp_error_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_error_t, and replace with enum sctp_error in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 4 ++-- net/sctp/sm_statefuns.c | 2 +- 2 files changed, 3 insertions(+), 3 del

[PATCH net-next 03/14] sctp: remove the typedef sctp_errhdr_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_errhdr_t, and replace with struct sctp_errhdr in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- inclu

[PATCH net-next 02/14] sctp: fix the name of struct sctp_shutdown_chunk_t

2017-08-03 Thread Xin Long
This patch is to fix the name of struct sctp_shutdown_chunk_t , replace with struct sctp_initack_chunk in the places where it's using it. It is also to fix some indent problem. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 2 +- net/sctp/sm_statefuns.

[PATCH net-next 00/14] sctp: remove typedefs from structures part 4

2017-08-03 Thread Xin Long
this patchset, all typedefs are cleaned in linux/sctp.h. Just as the part 1-3, No any code's logic would be changed in these patches, only cleaning up. Xin Long (14): sctp: remove the typedef sctp_shutdownhdr_t sctp: fix the name of struct sctp_shutdown_chunk_t sctp: remove the typedef

[PATCH net-next 01/14] sctp: remove the typedef sctp_shutdownhdr_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_shutdownhdr_t, and replace with struct sctp_shutdownhdr in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--

[PATCH net-next 04/14] sctp: remove the typedef sctp_operr_chunk_t

2017-08-03 Thread Xin Long
This patch is to remove the typedef sctp_operr_chunk_t, and replace with struct sctp_operr_chunk in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 4 ++-- net/sctp/sm_statefuns.c | 4 ++-- 2 files changed, 4 insertions

[PATCH net] ipv6: set rt6i_protocol properly in the route when it is installed

2017-08-03 Thread Xin Long
_fill_node. This is also an improvement to keep rt6i_protocol consistent with rtm_protocol. Fixes: c2ed1880fd61 ("net: ipv6: check route protocol when deleting routes") Reported-by: Jianlin Shi <ji...@redhat.com> Suggested-by: David Ahern <dsah...@gmail.com> Signed-off-by

Re: [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT

2017-07-31 Thread Xin Long
On Tue, Aug 1, 2017 at 2:01 PM, David Ahern <dsah...@gmail.com> wrote: > On 7/31/17 7:40 PM, Xin Long wrote: >> To respect the old code more, setting RTPROT_RA only when >> it's with the flag (ADDRCONF | DEFAULT | ROUTEINFO), >> shouldn't it be: > > Look at

Re: [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT

2017-07-31 Thread Xin Long
On Tue, Aug 1, 2017 at 12:12 PM, David Ahern <dsah...@gmail.com> wrote: > On 7/30/17 9:31 PM, Xin Long wrote: >>> Did you look at removing this hunk from rt6_fill_node: >>> >>> if (rt->rt6i_flags & RTF_DYNAMIC) >>> r

Re: [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT

2017-07-30 Thread Xin Long
On Mon, Jul 31, 2017 at 2:35 PM, David Ahern <dsah...@gmail.com> wrote: > On 7/30/17 6:51 AM, Xin Long wrote: >> diff --git a/net/ipv6/route.c b/net/ipv6/route.c >> index 4d30c96..187580f 100644 >> --- a/net/ipv6/route.c >> +++ b/net/ipv6/route.c >

[PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT

2017-07-30 Thread Xin Long
necessary as kernel should do the reverse conversion when rtm goes to cfg. Fixes: c2ed1880fd61 ("net: ipv6: check route protocol when deleting routes") Signed-off-by: Xin Long <lucien@gmail.com> --- net/ipv6/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --gi

[PATCH net] sctp: fix the check for _sctp_walk_params and _sctp_walk_errors

2017-07-26 Thread Xin Long
of(length)' instead of 'chunk_end < offset(length) + sizeof(length)' for both _sctp_walk_params and _sctp_walk_errors. Fixes: b1f5bfc27a19 ("sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()") Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/s

[PATCH net] dccp: fix a memleak for dccp_feat_init err process

2017-07-26 Thread Xin Long
In dccp_feat_init, when ccid_get_builtin_ccids failsto alloc memory for rx.val, it should free tx.val before returning an error. Signed-off-by: Xin Long <lucien@gmail.com> --- net/dccp/feat.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/dccp/feat.c

[PATCH net] dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly

2017-07-26 Thread Xin Long
The patch "dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly" fixed reqsk refcnt leak for dccp_ipv6. The same issue exists on dccp_ipv4. This patch is to fix it for dccp_ipv4. Signed-off-by: Xin Long <lucien@gmail.com> --- net/dccp/ipv4.c | 1 + 1 file chan

[PATCH net] dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly

2017-07-26 Thread Xin Long
_IP); connect(s2, , 0x20); close(s1); close(s2); This patch is to put the reqsk before dccp_v6_conn_request returns, just as what tcp_conn_request does. Reported-by: Jianlin Shi <ji...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/dccp/ipv6.c | 1 + 1 file chang

[PATCH net-next 11/11] sctp: remove the typedef sctp_abort_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_abort_chunk_t, and replace with struct sctp_abort_chunk in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 4 ++-- net/sctp/sm_statefuns.c | 8 2 files changed, 6 inse

[PATCH net-next 09/11] sctp: remove the typedef sctp_heartbeathdr_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_heartbeathdr_t, and replace with struct sctp_heartbeathdr in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 6 +++--- net/sctp/sm_statefuns.c | 2 +- 2 files changed, 4 inse

[PATCH net-next 10/11] sctp: remove the typedef sctp_heartbeat_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_heartbeat_chunk_t, and replace with struct sctp_heartbeat_chunk in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 4 ++-- net/sctp/sm_statefuns.c | 3 ++- 2 files chan

[PATCH net-next 07/11] sctp: remove the typedef sctp_sackhdr_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_sackhdr_t, and replace with struct sctp_sackhdr in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- include/net/sctp/command.h | 4 ++-- net/sctp/sm_statefuns.c

[PATCH net-next 08/11] sctp: remove the typedef sctp_sack_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_sack_chunk_t, and replace with struct sctp_sack_chunk in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h| 4 ++-- net/sctp/chunk.c| 2 +- net/sctp/sm_statefuns.c | 4 +

[PATCH net-next 02/11] sctp: remove the typedef sctp_cookie_param_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_cookie_param_t, and replace with struct sctp_cookie_param in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 ++-- net/sctp/sm_make_chunk.c | 18 ++ 2 files c

[PATCH net-next 06/11] sctp: remove the typedef sctp_sack_variable_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_sack_variable_t, and replace with union sctp_sack_variable in the places where it's using this typedef. It is also to fix some indents in sctp_acked(). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- ne

[PATCH net-next 05/11] sctp: remove the typedef sctp_dup_tsn_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_dup_tsn_t, and replace with __be32 in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/sctp.h b/i

[PATCH net-next 01/11] sctp: remove the typedef sctp_initack_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_initack_chunk_t, and replace with struct sctp_initack_chunk in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h

[PATCH net-next 00/11] sctp: remove typedefs from structures part 3

2017-07-22 Thread Xin Long
as the part 1 and 2, No any code's logic would be changed in these patches, only cleaning up. Xin Long (11): sctp: remove the typedef sctp_initack_chunk_t sctp: remove the typedef sctp_cookie_param_t sctp: remove the typedef sctp_unrecognized_param_t sctp: remove the typedef

[PATCH net-next 03/11] sctp: remove the typedef sctp_unrecognized_param_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_unrecognized_param_t, and replace with struct sctp_unrecognized_param in the places where it's using this typedef. It is also to fix some indents in sctp_sf_do_unexpected_init() and sctp_sf_do_5_1B_init(). Signed-off-by: Xin Long <lucien@gmail.

[PATCH net-next 04/11] sctp: remove the typedef sctp_gap_ack_block_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_gap_ack_block_t, and replace with struct sctp_gap_ack_block in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCHv2 net-next 11/11] sctp: remove the typedef sctp_hmac_algo_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_hmac_algo_param_t, and replace with struct sctp_hmac_algo_param in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h

[PATCHv2 net-next 10/11] sctp: remove the typedef sctp_chunks_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_chunks_param_t, and replace with struct sctp_chunks_param in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h

[PATCHv2 net-next 08/11] sctp: remove the typedef sctp_supported_ext_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_supported_ext_param_t, and replace with struct sctp_supported_ext_param in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/

[PATCHv2 net-next 09/11] sctp: remove the typedef sctp_random_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_random_param_t, and replace with struct sctp_random_param in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 ++-- include/net/sctp/structs.h | 2 +- net/sctp/

[PATCHv2 net-next 07/11] sctp: remove the typedef sctp_adaptation_ind_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_adaptation_ind_param_t, and replace with struct sctp_adaptation_ind_param in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 ++-- net/sctp/sm_make_chunk.c | 4 ++-- 2 files c

[PATCHv2 net-next 01/11] sctp: remove the typedef sctp_ipv4addr_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_ipv4addr_param_t, and replace with struct sctp_ipv4addr_param in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 6 +++--- net/sctp/protocol.c | 2 +- net/sctp/sm_make_c

[PATCHv2 net-next 06/11] sctp: remove struct sctp_ecn_capable_param

2017-07-16 Thread Xin Long
Remove it, there is even no places using it. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 3ca3ab7..7552482 100644 --- a/include/linux/sctp.h +++ b/include

[PATCHv2 net-next 03/11] sctp: remove the typedef sctp_cookie_preserve_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_cookie_preserve_param_t, and replace with struct sctp_cookie_preserve_param in the places where it's using this typedef. It is also to fix some indents in sctp_sf_do_5_2_6_stale(). Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/

[PATCHv2 net-next 05/11] sctp: remove the typedef sctp_supported_addrs_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_supported_addrs_param_t, and replace with struct sctp_supported_addrs_param in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 ++-- net/sctp/sm_make_chunk.c | 2 +- 2 files c

[PATCHv2 net-next 02/11] sctp: remove the typedef sctp_ipv6addr_param_t

2017-07-16 Thread Xin Long
This patch is to remove the typedef sctp_ipv6addr_param_t, and replace with struct sctp_ipv6addr_param in the places where it's using this typedef. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 ++-- net/sctp/ipv6.c | 2 +- net/sctp/sm_make_chunk

[PATCHv2 net-next 04/11] sctp: remove the typedef sctp_hostname_param_t

2017-07-16 Thread Xin Long
Remove this typedef, there is even no places using it. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/sctp.h b/include/linux/sctp.h index d8f9d8f..c43e906 100644 --- a/include

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