aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/sctp/structs.h8
-rw-r--r--net/sctp/sm_make_chunk.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ad3d15cb0a0d..8c522ae031bb 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1250,6 +1250,14 @@ struct sctp_endpoint {
1250 int last_key; 1250 int last_key;
1251 int key_changed_at; 1251 int key_changed_at;
1252 1252
1253 /* digest: This is a digest of the sctp cookie. This field is
1254 * only used on the receive path when we try to validate
1255 * that the cookie has not been tampered with. We put
1256 * this here so we pre-allocate this once and can re-use
1257 * on every receive.
1258 */
1259 __u8 digest[SCTP_SIGNATURE_SIZE];
1260
1253 /* sendbuf acct. policy. */ 1261 /* sendbuf acct. policy. */
1254 __u32 sndbuf_policy; 1262 __u32 sndbuf_policy;
1255 1263
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 4fe1d6c863b1..5e0de3c0eead 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1359,7 +1359,7 @@ struct sctp_association *sctp_unpack_cookie(
1359 struct sctp_signed_cookie *cookie; 1359 struct sctp_signed_cookie *cookie;
1360 struct sctp_cookie *bear_cookie; 1360 struct sctp_cookie *bear_cookie;
1361 int headersize, bodysize, fixed_size; 1361 int headersize, bodysize, fixed_size;
1362 __u8 digest[SCTP_SIGNATURE_SIZE]; 1362 __u8 *digest = ep->digest;
1363 struct scatterlist sg; 1363 struct scatterlist sg;
1364 unsigned int keylen, len; 1364 unsigned int keylen, len;
1365 char *key; 1365 char *key;