aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_make_chunk.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r--net/sctp/sm_make_chunk.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 658476c4d58..c055212875f 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1514,9 +1514,7 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,
1514 1514
1515 /* Sign the message. */ 1515 /* Sign the message. */
1516 sg_init_table(&sg, 1); 1516 sg_init_table(&sg, 1);
1517 sg_set_page(&sg, virt_to_page(&cookie->c)); 1517 sg_set_buf(&sg, &cookie->c, bodysize);
1518 sg.offset = (unsigned long)(&cookie->c) % PAGE_SIZE;
1519 sg.length = bodysize;
1520 keylen = SCTP_SECRET_SIZE; 1518 keylen = SCTP_SECRET_SIZE;
1521 key = (char *)ep->secret_key[ep->current_key]; 1519 key = (char *)ep->secret_key[ep->current_key];
1522 desc.tfm = sctp_sk(ep->base.sk)->hmac; 1520 desc.tfm = sctp_sk(ep->base.sk)->hmac;
@@ -1587,9 +1585,7 @@ struct sctp_association *sctp_unpack_cookie(
1587 /* Check the signature. */ 1585 /* Check the signature. */
1588 keylen = SCTP_SECRET_SIZE; 1586 keylen = SCTP_SECRET_SIZE;
1589 sg_init_table(&sg, 1); 1587 sg_init_table(&sg, 1);
1590 sg_set_page(&sg, virt_to_page(bear_cookie)); 1588 sg_set_buf(&sg, bear_cookie, bodysize);
1591 sg.offset = (unsigned long)(bear_cookie) % PAGE_SIZE;
1592 sg.length = bodysize;
1593 key = (char *)ep->secret_key[ep->current_key]; 1589 key = (char *)ep->secret_key[ep->current_key];
1594 desc.tfm = sctp_sk(ep->base.sk)->hmac; 1590 desc.tfm = sctp_sk(ep->base.sk)->hmac;
1595 desc.flags = 0; 1591 desc.flags = 0;