sctp: fix to indicate ASCONF support in INIT-ACK only if peer has such capable
authorWei Yongjun <yjwei@cn.fujitsu.com>
Thu, 12 Mar 2009 09:49:18 +0000 (09:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Mar 2009 18:37:56 +0000 (11:37 -0700)
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: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_make_chunk.c

index b40e95f9851b243870f2c1306c730ee7ff72e215..9484f33730f6228cd4919a7911b213fbd497f6af 100644 (file)
@@ -372,10 +372,10 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
        if (asoc->peer.ecn_capable)
                chunksize += sizeof(ecap_param);
 
-       if (sctp_prsctp_enable)
+       if (asoc->peer.prsctp_capable)
                chunksize += sizeof(prsctp_param);
 
-       if (sctp_addip_enable) {
+       if (asoc->peer.asconf_capable) {
                extensions[num_ext] = SCTP_CID_ASCONF;
                extensions[num_ext+1] = SCTP_CID_ASCONF_ACK;
                num_ext += 2;