[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160525.221454.1093609843174055034.davem@davemloft.net>
Date: Wed, 25 May 2016 22:14:54 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: lucien.xin@...il.com
Cc: netdev@...r.kernel.org, linux-sctp@...r.kernel.org,
marcelo.leitner@...il.com, vyasevich@...il.com,
daniel@...earbox.net, phil@....cc
Subject: Re: [PATCH net] sctp: fix double EPs display in sctp_diag
From: Xin Long <lucien.xin@...il.com>
Date: Thu, 26 May 2016 03:09:23 +0800
> We have this situation: that EP hash table, contains only the EPs
> that are listening, while the transports one, has the opposite.
> We have to traverse both to dump all.
>
> But when we traverse the transports one we will also get EPs that are
> in the EP hash if they are listening. In this case, the EP is dumped
> twice.
>
> We will fix it by checking if the endpoint that is in the endpoint
> hash table contains any ep->asoc in there, as it means we will also
> find it via transport hash, and thus we can/should skip it, depending
> on the filters used, like 'ss -l'.
>
> Still, we should NOT skip it if the user is listing only listening
> endpoints, because then we are not traversing the transport hash.
> so we have to check idiag_states there also.
>
> Signed-off-by: Xin Long <lucien.xin@...il.com>
Applied.
Powered by blists - more mailing lists