diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 13:44:26 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:56 -0400 |
commit | fa05f1286be25a8ce915c5dd492aea61126b3f33 (patch) | |
tree | 07d6d32733f3272d588410a64c0cfa25d794e3be /net/sctp/sm_make_chunk.c | |
parent | 60c74f81933635bb4ccb4ee6f31909c51f5cd230 (diff) |
Update net/ to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index f983a369d4e2..d5a9785a158b 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1513,7 +1513,8 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep, | |||
1513 | struct hash_desc desc; | 1513 | struct hash_desc desc; |
1514 | 1514 | ||
1515 | /* Sign the message. */ | 1515 | /* Sign the message. */ |
1516 | sg.page = virt_to_page(&cookie->c); | 1516 | sg_init_table(&sg, 1); |
1517 | sg_set_page(&sg, virt_to_page(&cookie->c)); | ||
1517 | sg.offset = (unsigned long)(&cookie->c) % PAGE_SIZE; | 1518 | sg.offset = (unsigned long)(&cookie->c) % PAGE_SIZE; |
1518 | sg.length = bodysize; | 1519 | sg.length = bodysize; |
1519 | keylen = SCTP_SECRET_SIZE; | 1520 | keylen = SCTP_SECRET_SIZE; |
@@ -1585,7 +1586,8 @@ struct sctp_association *sctp_unpack_cookie( | |||
1585 | 1586 | ||
1586 | /* Check the signature. */ | 1587 | /* Check the signature. */ |
1587 | keylen = SCTP_SECRET_SIZE; | 1588 | keylen = SCTP_SECRET_SIZE; |
1588 | sg.page = virt_to_page(bear_cookie); | 1589 | sg_init_table(&sg, 1); |
1590 | sg_set_page(&sg, virt_to_page(bear_cookie)); | ||
1589 | sg.offset = (unsigned long)(bear_cookie) % PAGE_SIZE; | 1591 | sg.offset = (unsigned long)(bear_cookie) % PAGE_SIZE; |
1590 | sg.length = bodysize; | 1592 | sg.length = bodysize; |
1591 | key = (char *)ep->secret_key[ep->current_key]; | 1593 | key = (char *)ep->secret_key[ep->current_key]; |