Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-08 Thread Marcelo Ricardo Leitner
Em 08-06-2016 07:42, Xin Long escreveu: On Tue, Jun 7, 2016 at 7:03 PM, Xin Long wrote: On Sat, Jun 4, 2016 at 8:22 PM, Marcelo Ricardo Leitner --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -7565,10 +7565,12 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-08 Thread Xin Long
On Tue, Jun 7, 2016 at 7:03 PM, Xin Long wrote: > On Sat, Jun 4, 2016 at 8:22 PM, Marcelo Ricardo Leitner > > --- a/net/sctp/socket.c > +++ b/net/sctp/socket.c > @@ -7565,10 +7565,12 @@ static void sctp_sock_migrate(struct sock > *oldsk, struct sock *newsk, > /* If the association on the n

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-08 Thread Xin Long
On Tue, Jun 7, 2016 at 8:08 PM, Marcelo Ricardo Leitner wrote: > On Tue, Jun 07, 2016 at 07:03:55PM +0800, Xin Long wrote: >> On Sat, Jun 4, 2016 at 8:22 PM, Marcelo Ricardo Leitner >> wrote: >> > >> > Return error? Please don't. Adam Endrodi asked in May (linux-sctp@) a way >> > to >> > return

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-07 Thread Marcelo Ricardo Leitner
On Tue, Jun 07, 2016 at 07:03:55PM +0800, Xin Long wrote: > On Sat, Jun 4, 2016 at 8:22 PM, Marcelo Ricardo Leitner > wrote: > > > > Return error? Please don't. Adam Endrodi asked in May (linux-sctp@) a way to > > return the addresses used on such attempts and currently this address > > returned b

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-07 Thread Xin Long
On Sat, Jun 4, 2016 at 8:22 PM, Marcelo Ricardo Leitner wrote: > > Return error? Please don't. Adam Endrodi asked in May (linux-sctp@) a way to > return the addresses used on such attempts and currently this address > returned by accept() is the only one we can get. [1] I've checked Adam's email,

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-05 Thread David Miller
From: Xin Long Date: Fri, 3 Jun 2016 22:42:45 +0800 > Now sctp doesn't change socket state upon shutdown reception. It changes > just the assoc state, even though it's a TCP-style socket. > > For some cases, if we really need to check sk->sk_state, it's necessary to > fix this issue, at least w

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-04 Thread Marcelo Ricardo Leitner
Em 04-06-2016 06:45, Xin Long escreveu: On Sat, Jun 4, 2016 at 1:49 AM, Marcelo Ricardo Leitner wrote: On Fri, Jun 03, 2016 at 10:42:45PM +0800, Xin Long wrote: Now sctp doesn't change socket state upon shutdown reception. It changes just the assoc state, even though it's a TCP-style socket.

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-04 Thread Xin Long
On Sat, Jun 4, 2016 at 1:49 AM, Marcelo Ricardo Leitner wrote: > On Fri, Jun 03, 2016 at 10:42:45PM +0800, Xin Long wrote: >> Now sctp doesn't change socket state upon shutdown reception. It changes >> just the assoc state, even though it's a TCP-style socket. >> >> For some cases, if we really ne

Re: [PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-03 Thread Marcelo Ricardo Leitner
On Fri, Jun 03, 2016 at 10:42:45PM +0800, Xin Long wrote: > Now sctp doesn't change socket state upon shutdown reception. It changes > just the assoc state, even though it's a TCP-style socket. > > For some cases, if we really need to check sk->sk_state, it's necessary to > fix this issue, at leas

[PATCHv2 net-next] sctp: sctp should change socket state when shutdown is received

2016-06-03 Thread Xin Long
Now sctp doesn't change socket state upon shutdown reception. It changes just the assoc state, even though it's a TCP-style socket. For some cases, if we really need to check sk->sk_state, it's necessary to fix this issue, at least when we use ss or netstat to dump, we can get a more exact informa