summaryrefslogtreecommitdiff
path: root/net/sctp/sm_statefuns.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2014-03-31 08:10:55 +0100
committerGrant Likely <grant.likely@linaro.org>2014-03-31 08:10:55 +0100
commitd88cf7d7b4240b8df170ba105e414e476fb51cce (patch)
tree7efe976da6e0ec854eb0eeda82c1e9a275b8c69f /net/sctp/sm_statefuns.c
parent676e1b2fcd9dbb47a59baac13d089621d22c68b8 (diff)
parent6f976267da0e2c873c4b4aaacaf08266d1d1797d (diff)
Merge remote-tracking branch 'robh/for-next' into devicetree/next
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r--net/sctp/sm_statefuns.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 591b44d3b7de..ae65b6b5973a 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -758,6 +758,13 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net,
struct sctp_chunk auth;
sctp_ierror_t ret;
+ /* Make sure that we and the peer are AUTH capable */
+ if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) {
+ kfree_skb(chunk->auth_chunk);
+ sctp_association_free(new_asoc);
+ return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
+ }
+
/* set-up our fake chunk so that we can process it */
auth.skb = chunk->auth_chunk;
auth.asoc = chunk->asoc;