Skip to content

Commit

Permalink
SCTP: Correctly disable ADD-IP when AUTH is not supported.
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
  • Loading branch information
Vlad Yasevich committed Nov 7, 2007
1 parent 0ed90fb commit 88799fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,6 @@ struct sctp_association {
__u8 asconf_capable; /* Does peer support ADDIP? */
__u8 prsctp_capable; /* Can peer do PR-SCTP? */
__u8 auth_capable; /* Is peer doing SCTP-AUTH? */
__u8 addip_capable; /* Can peer do ADD-IP */

__u32 adaptation_ind; /* Adaptation Code point. */

Expand Down
2 changes: 1 addition & 1 deletion net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
/* Assume that the peer recongizes ASCONF until reported otherwise
* via an ERROR chunk.
*/
asoc->peer.asconf_capable = 1;
asoc->peer.asconf_capable = 0;

/* Create an input queue. */
sctp_inq_init(&asoc->base.inqueue);
Expand Down
5 changes: 3 additions & 2 deletions net/sctp/sm_make_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
break;
case SCTP_CID_ASCONF:
case SCTP_CID_ASCONF_ACK:
asoc->peer.addip_capable = 1;
asoc->peer.asconf_capable = 1;
break;
default:
break;
Expand Down Expand Up @@ -2138,10 +2138,11 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid,
/* If the peer claims support for ADD-IP without support
* for AUTH, disable support for ADD-IP.
*/
if (asoc->peer.addip_capable && !asoc->peer.auth_capable) {
if (asoc->peer.asconf_capable && !asoc->peer.auth_capable) {
asoc->peer.addip_disabled_mask |= (SCTP_PARAM_ADD_IP |
SCTP_PARAM_DEL_IP |
SCTP_PARAM_SET_PRIMARY);
asoc->peer.asconf_capable = 0;
}

/* Walk list of transports, removing transports in the UNKNOWN state. */
Expand Down

0 comments on commit 88799fe

Please sign in to comment.