]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: get pr_assoc and pr_stream all status with SCTP_PR_SCTP_ALL instead
authorXin Long <lucien.xin@gmail.com>
Tue, 16 Oct 2018 07:52:02 +0000 (15:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2018 16:58:49 +0000 (09:58 -0700)
commit5e3dc4e455dd0fe425ccec764c04fc6ae29f77d7
tree7fafd2ee6ab581c498d0c6b660417102939c2115
parent660284e2ff2d20a594915ca7e887104e4c1f6015
sctp: get pr_assoc and pr_stream all status with SCTP_PR_SCTP_ALL instead

According to rfc7496 section 4.3 or 4.4:

   sprstat_policy:  This parameter indicates for which PR-SCTP policy
      the user wants the information.  It is an error to use
      SCTP_PR_SCTP_NONE in sprstat_policy.  If SCTP_PR_SCTP_ALL is used,
      the counters provided are aggregated over all supported policies.

We change to dump pr_assoc and pr_stream all status by SCTP_PR_SCTP_ALL
instead, and return error for SCTP_PR_SCTP_NONE, as it also said "It is
an error to use SCTP_PR_SCTP_NONE in sprstat_policy. "

Fixes: 2f5e48e2e505 ("sctp: add SCTP_PR_ASSOC_STATUS on sctp sockopt")
Fixes: d09fd0b37ced ("sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp")
Reported-by: Ying Xu <yinxu@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/sctp.h
net/sctp/socket.c