diff options
author | Xin Long <lucien.xin@gmail.com> | 2023-04-14 17:21:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-17 08:28:21 +0100 |
commit | ab4f1e28c941b2554456bfe091db0caf25c33044 (patch) | |
tree | 06ea84b9ea59647e420c89c9a8b2400110e8d998 /net/sctp | |
parent | bd4b28189469492df2b962d737842c311ce2659c (diff) | |
download | linux-stable-ab4f1e28c941b2554456bfe091db0caf25c33044.tar.gz linux-stable-ab4f1e28c941b2554456bfe091db0caf25c33044.tar.bz2 linux-stable-ab4f1e28c941b2554456bfe091db0caf25c33044.zip |
sctp: add intl_capable and reconf_capable in ss peer_capable
There are two new peer capables have been added since sctp_diag was
introduced into SCTP. When dumping the peer capables, these two new
peer capables should also be included. To not break the old capables,
reconf_capable takes the old hostname_address bit, and intl_capable
uses the higher available bit in sctpi_peer_capable.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 079e726909b4..cda8c2874691 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5192,10 +5192,11 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc, info->sctpi_peer_rwnd = asoc->peer.rwnd; info->sctpi_peer_tag = asoc->c.peer_vtag; - mask = asoc->peer.ecn_capable << 1; + mask = asoc->peer.intl_capable << 1; + mask = (mask | asoc->peer.ecn_capable) << 1; mask = (mask | asoc->peer.ipv4_address) << 1; mask = (mask | asoc->peer.ipv6_address) << 1; - mask = mask << 1; + mask = (mask | asoc->peer.reconf_capable) << 1; mask = (mask | asoc->peer.asconf_capable) << 1; mask = (mask | asoc->peer.prsctp_capable) << 1; mask = (mask | asoc->peer.auth_capable); |