Commit 5ffad5ac authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

sctp: fix to indicate ASCONF support in INIT-ACK only if peer has such capable

This patch fix to indicate ASCONF support in INIT-ACK only if peer has
such capable.

This patch also fix to calc the chunk size if peer has no FWD-TSN
capable.
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5e8f3f70
...@@ -372,10 +372,10 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, ...@@ -372,10 +372,10 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
if (asoc->peer.ecn_capable) if (asoc->peer.ecn_capable)
chunksize += sizeof(ecap_param); chunksize += sizeof(ecap_param);
if (sctp_prsctp_enable) if (asoc->peer.prsctp_capable)
chunksize += sizeof(prsctp_param); chunksize += sizeof(prsctp_param);
if (sctp_addip_enable) { if (asoc->peer.asconf_capable) {
extensions[num_ext] = SCTP_CID_ASCONF; extensions[num_ext] = SCTP_CID_ASCONF;
extensions[num_ext+1] = SCTP_CID_ASCONF_ACK; extensions[num_ext+1] = SCTP_CID_ASCONF_ACK;
num_ext += 2; num_ext += 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment