aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2008-09-18 19:27:38 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-18 19:27:38 -0400
commit0ef46e285c062cbe35d60c0adbff96f530d31c86 (patch)
treec2fc631d5760f097bab6b5173166c872639580ff /net
parenta3028b8ed1e1e9930bfa70ce4555fb7f9fad3dcc (diff)
sctp: do not enable peer features if we can't do them.
Do not enable peer features like addip and auth, if they are administratively disabled localy. If the peer resports that he supports something that we don't, neither end can use it so enabling it is pointless. This solves a problem when talking to a peer that has auth and addip enabled while we do not. Found by Andrei Pelinescu-Onciul <andrei@iptel.org>. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/sm_make_chunk.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index e8ca4e54981f..fe94f42fa068 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1886,11 +1886,13 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
1886 /* if the peer reports AUTH, assume that he 1886 /* if the peer reports AUTH, assume that he
1887 * supports AUTH. 1887 * supports AUTH.
1888 */ 1888 */
1889 asoc->peer.auth_capable = 1; 1889 if (sctp_auth_enable)
1890 asoc->peer.auth_capable = 1;
1890 break; 1891 break;
1891 case SCTP_CID_ASCONF: 1892 case SCTP_CID_ASCONF:
1892 case SCTP_CID_ASCONF_ACK: 1893 case SCTP_CID_ASCONF_ACK:
1893 asoc->peer.asconf_capable = 1; 1894 if (sctp_addip_enable)
1895 asoc->peer.asconf_capable = 1;
1894 break; 1896 break;
1895 default: 1897 default:
1896 break; 1898 break;
@@ -2460,6 +2462,9 @@ do_addr_param:
2460 break; 2462 break;
2461 2463
2462 case SCTP_PARAM_SET_PRIMARY: 2464 case SCTP_PARAM_SET_PRIMARY:
2465 if (!sctp_addip_enable)
2466 goto fall_through;
2467
2463 addr_param = param.v + sizeof(sctp_addip_param_t); 2468 addr_param = param.v + sizeof(sctp_addip_param_t);
2464 2469
2465 af = sctp_get_af_specific(param_type2af(param.p->type)); 2470 af = sctp_get_af_specific(param_type2af(param.p->type));