diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 783481860174..f7fb29d5a0c7 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -118,7 +118,7 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code, | |||
118 | int padlen; | 118 | int padlen; |
119 | __u16 len; | 119 | __u16 len; |
120 | 120 | ||
121 | /* Cause code constants are now defined in network order. */ | 121 | /* Cause code constants are now defined in network order. */ |
122 | err.cause = cause_code; | 122 | err.cause = cause_code; |
123 | len = sizeof(sctp_errhdr_t) + paylen; | 123 | len = sizeof(sctp_errhdr_t) + paylen; |
124 | padlen = len % 4; | 124 | padlen = len % 4; |
@@ -295,11 +295,11 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, | |||
295 | */ | 295 | */ |
296 | chunksize = sizeof(initack) + addrs_len + cookie_len + unkparam_len; | 296 | chunksize = sizeof(initack) + addrs_len + cookie_len + unkparam_len; |
297 | 297 | ||
298 | /* Tell peer that we'll do ECN only if peer advertised such cap. */ | 298 | /* Tell peer that we'll do ECN only if peer advertised such cap. */ |
299 | if (asoc->peer.ecn_capable) | 299 | if (asoc->peer.ecn_capable) |
300 | chunksize += sizeof(ecap_param); | 300 | chunksize += sizeof(ecap_param); |
301 | 301 | ||
302 | /* Tell peer that we'll do PR-SCTP only if peer advertised. */ | 302 | /* Tell peer that we'll do PR-SCTP only if peer advertised. */ |
303 | if (asoc->peer.prsctp_capable) | 303 | if (asoc->peer.prsctp_capable) |
304 | chunksize += sizeof(prsctp_param); | 304 | chunksize += sizeof(prsctp_param); |
305 | 305 | ||
@@ -728,7 +728,7 @@ struct sctp_chunk *sctp_make_shutdown_complete( | |||
728 | if (retval && chunk) | 728 | if (retval && chunk) |
729 | retval->transport = chunk->transport; | 729 | retval->transport = chunk->transport; |
730 | 730 | ||
731 | return retval; | 731 | return retval; |
732 | } | 732 | } |
733 | 733 | ||
734 | /* Create an ABORT. Note that we set the T bit if we have no | 734 | /* Create an ABORT. Note that we set the T bit if we have no |
@@ -844,7 +844,7 @@ err_chunk: | |||
844 | return retval; | 844 | return retval; |
845 | } | 845 | } |
846 | 846 | ||
847 | /* Make an ABORT chunk with a PROTOCOL VIOLATION cause code. */ | 847 | /* Make an ABORT chunk with a PROTOCOL VIOLATION cause code. */ |
848 | struct sctp_chunk *sctp_make_abort_violation( | 848 | struct sctp_chunk *sctp_make_abort_violation( |
849 | const struct sctp_association *asoc, | 849 | const struct sctp_association *asoc, |
850 | const struct sctp_chunk *chunk, | 850 | const struct sctp_chunk *chunk, |
@@ -1264,8 +1264,8 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep, | |||
1264 | /* Header size is static data prior to the actual cookie, including | 1264 | /* Header size is static data prior to the actual cookie, including |
1265 | * any padding. | 1265 | * any padding. |
1266 | */ | 1266 | */ |
1267 | headersize = sizeof(sctp_paramhdr_t) + | 1267 | headersize = sizeof(sctp_paramhdr_t) + |
1268 | (sizeof(struct sctp_signed_cookie) - | 1268 | (sizeof(struct sctp_signed_cookie) - |
1269 | sizeof(struct sctp_cookie)); | 1269 | sizeof(struct sctp_cookie)); |
1270 | bodysize = sizeof(struct sctp_cookie) | 1270 | bodysize = sizeof(struct sctp_cookie) |
1271 | + ntohs(init_chunk->chunk_hdr->length) + addrs_len; | 1271 | + ntohs(init_chunk->chunk_hdr->length) + addrs_len; |
@@ -1314,7 +1314,7 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep, | |||
1314 | memcpy((__u8 *)&cookie->c.peer_init[0] + | 1314 | memcpy((__u8 *)&cookie->c.peer_init[0] + |
1315 | ntohs(init_chunk->chunk_hdr->length), raw_addrs, addrs_len); | 1315 | ntohs(init_chunk->chunk_hdr->length), raw_addrs, addrs_len); |
1316 | 1316 | ||
1317 | if (sctp_sk(ep->base.sk)->hmac) { | 1317 | if (sctp_sk(ep->base.sk)->hmac) { |
1318 | struct hash_desc desc; | 1318 | struct hash_desc desc; |
1319 | 1319 | ||
1320 | /* Sign the message. */ | 1320 | /* Sign the message. */ |
@@ -1323,8 +1323,8 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep, | |||
1323 | sg.length = bodysize; | 1323 | sg.length = bodysize; |
1324 | keylen = SCTP_SECRET_SIZE; | 1324 | keylen = SCTP_SECRET_SIZE; |
1325 | key = (char *)ep->secret_key[ep->current_key]; | 1325 | key = (char *)ep->secret_key[ep->current_key]; |
1326 | desc.tfm = sctp_sk(ep->base.sk)->hmac; | 1326 | desc.tfm = sctp_sk(ep->base.sk)->hmac; |
1327 | desc.flags = 0; | 1327 | desc.flags = 0; |
1328 | 1328 | ||
1329 | if (crypto_hash_setkey(desc.tfm, key, keylen) || | 1329 | if (crypto_hash_setkey(desc.tfm, key, keylen) || |
1330 | crypto_hash_digest(&desc, &sg, bodysize, cookie->signature)) | 1330 | crypto_hash_digest(&desc, &sg, bodysize, cookie->signature)) |
@@ -1364,7 +1364,7 @@ struct sctp_association *sctp_unpack_cookie( | |||
1364 | * any padding. | 1364 | * any padding. |
1365 | */ | 1365 | */ |
1366 | headersize = sizeof(sctp_chunkhdr_t) + | 1366 | headersize = sizeof(sctp_chunkhdr_t) + |
1367 | (sizeof(struct sctp_signed_cookie) - | 1367 | (sizeof(struct sctp_signed_cookie) - |
1368 | sizeof(struct sctp_cookie)); | 1368 | sizeof(struct sctp_cookie)); |
1369 | bodysize = ntohs(chunk->chunk_hdr->length) - headersize; | 1369 | bodysize = ntohs(chunk->chunk_hdr->length) - headersize; |
1370 | fixed_size = headersize + sizeof(struct sctp_cookie); | 1370 | fixed_size = headersize + sizeof(struct sctp_cookie); |
@@ -1592,7 +1592,7 @@ static int sctp_process_inv_paramlength(const struct sctp_association *asoc, | |||
1592 | struct sctp_chunk **errp) | 1592 | struct sctp_chunk **errp) |
1593 | { | 1593 | { |
1594 | char error[] = "The following parameter had invalid length:"; | 1594 | char error[] = "The following parameter had invalid length:"; |
1595 | size_t payload_len = WORD_ROUND(sizeof(error)) + | 1595 | size_t payload_len = WORD_ROUND(sizeof(error)) + |
1596 | sizeof(sctp_paramhdr_t); | 1596 | sizeof(sctp_paramhdr_t); |
1597 | 1597 | ||
1598 | 1598 | ||
@@ -1751,7 +1751,7 @@ static int sctp_verify_param(const struct sctp_association *asoc, | |||
1751 | case SCTP_PARAM_FWD_TSN_SUPPORT: | 1751 | case SCTP_PARAM_FWD_TSN_SUPPORT: |
1752 | if (sctp_prsctp_enable) | 1752 | if (sctp_prsctp_enable) |
1753 | break; | 1753 | break; |
1754 | /* Fall Through */ | 1754 | /* Fall Through */ |
1755 | default: | 1755 | default: |
1756 | SCTP_DEBUG_PRINTK("Unrecognized param: %d for chunk %d.\n", | 1756 | SCTP_DEBUG_PRINTK("Unrecognized param: %d for chunk %d.\n", |
1757 | ntohs(param.p->type), cid); | 1757 | ntohs(param.p->type), cid); |
@@ -1860,7 +1860,7 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, | |||
1860 | sctp_walk_params(param, peer_init, init_hdr.params) { | 1860 | sctp_walk_params(param, peer_init, init_hdr.params) { |
1861 | 1861 | ||
1862 | if (!sctp_process_param(asoc, param, peer_addr, gfp)) | 1862 | if (!sctp_process_param(asoc, param, peer_addr, gfp)) |
1863 | goto clean_up; | 1863 | goto clean_up; |
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | /* Walk list of transports, removing transports in the UNKNOWN state. */ | 1866 | /* Walk list of transports, removing transports in the UNKNOWN state. */ |
@@ -1936,7 +1936,7 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, | |||
1936 | */ | 1936 | */ |
1937 | 1937 | ||
1938 | /* Allocate storage for the negotiated streams if it is not a temporary | 1938 | /* Allocate storage for the negotiated streams if it is not a temporary |
1939 | * association. | 1939 | * association. |
1940 | */ | 1940 | */ |
1941 | if (!asoc->temp) { | 1941 | if (!asoc->temp) { |
1942 | int assoc_id; | 1942 | int assoc_id; |
@@ -2108,7 +2108,7 @@ static int sctp_process_param(struct sctp_association *asoc, | |||
2108 | asoc->peer.prsctp_capable = 1; | 2108 | asoc->peer.prsctp_capable = 1; |
2109 | break; | 2109 | break; |
2110 | } | 2110 | } |
2111 | /* Fall Through */ | 2111 | /* Fall Through */ |
2112 | default: | 2112 | default: |
2113 | /* Any unrecognized parameters should have been caught | 2113 | /* Any unrecognized parameters should have been caught |
2114 | * and handled by sctp_verify_param() which should be | 2114 | * and handled by sctp_verify_param() which should be |
@@ -2167,7 +2167,7 @@ __u32 sctp_generate_tsn(const struct sctp_endpoint *ep) | |||
2167 | * | ASCONF Parameter #N | | 2167 | * | ASCONF Parameter #N | |
2168 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 2168 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
2169 | * | 2169 | * |
2170 | * Address Parameter and other parameter will not be wrapped in this function | 2170 | * Address Parameter and other parameter will not be wrapped in this function |
2171 | */ | 2171 | */ |
2172 | static struct sctp_chunk *sctp_make_asconf(struct sctp_association *asoc, | 2172 | static struct sctp_chunk *sctp_make_asconf(struct sctp_association *asoc, |
2173 | union sctp_addr *addr, | 2173 | union sctp_addr *addr, |
@@ -2289,7 +2289,7 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *asoc, | |||
2289 | * | Address Parameter | | 2289 | * | Address Parameter | |
2290 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 2290 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
2291 | * | 2291 | * |
2292 | * Create an ASCONF chunk with Set Primary IP address parameter. | 2292 | * Create an ASCONF chunk with Set Primary IP address parameter. |
2293 | */ | 2293 | */ |
2294 | struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, | 2294 | struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, |
2295 | union sctp_addr *addr) | 2295 | union sctp_addr *addr) |
@@ -2338,7 +2338,7 @@ struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, | |||
2338 | * | ASCONF Parameter Response#N | | 2338 | * | ASCONF Parameter Response#N | |
2339 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 2339 | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
2340 | * | 2340 | * |
2341 | * Create an ASCONF_ACK chunk with enough space for the parameter responses. | 2341 | * Create an ASCONF_ACK chunk with enough space for the parameter responses. |
2342 | */ | 2342 | */ |
2343 | static struct sctp_chunk *sctp_make_asconf_ack(const struct sctp_association *asoc, | 2343 | static struct sctp_chunk *sctp_make_asconf_ack(const struct sctp_association *asoc, |
2344 | __u32 serial, int vparam_len) | 2344 | __u32 serial, int vparam_len) |
@@ -2380,7 +2380,7 @@ static void sctp_add_asconf_response(struct sctp_chunk *chunk, __be32 crr_id, | |||
2380 | ntohs(asconf_param->param_hdr.length); | 2380 | ntohs(asconf_param->param_hdr.length); |
2381 | } | 2381 | } |
2382 | 2382 | ||
2383 | /* Add Success Indication or Error Cause Indication parameter. */ | 2383 | /* Add Success Indication or Error Cause Indication parameter. */ |
2384 | ack_param.param_hdr.type = response_type; | 2384 | ack_param.param_hdr.type = response_type; |
2385 | ack_param.param_hdr.length = htons(sizeof(ack_param) + | 2385 | ack_param.param_hdr.length = htons(sizeof(ack_param) + |
2386 | err_param_len + | 2386 | err_param_len + |
@@ -2423,11 +2423,11 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc, | |||
2423 | switch (asconf_param->param_hdr.type) { | 2423 | switch (asconf_param->param_hdr.type) { |
2424 | case SCTP_PARAM_ADD_IP: | 2424 | case SCTP_PARAM_ADD_IP: |
2425 | /* ADDIP 4.3 D9) If an endpoint receives an ADD IP address | 2425 | /* ADDIP 4.3 D9) If an endpoint receives an ADD IP address |
2426 | * request and does not have the local resources to add this | 2426 | * request and does not have the local resources to add this |
2427 | * new address to the association, it MUST return an Error | 2427 | * new address to the association, it MUST return an Error |
2428 | * Cause TLV set to the new error code 'Operation Refused | 2428 | * Cause TLV set to the new error code 'Operation Refused |
2429 | * Due to Resource Shortage'. | 2429 | * Due to Resource Shortage'. |
2430 | */ | 2430 | */ |
2431 | 2431 | ||
2432 | peer = sctp_assoc_add_peer(asoc, &addr, GFP_ATOMIC, SCTP_UNCONFIRMED); | 2432 | peer = sctp_assoc_add_peer(asoc, &addr, GFP_ATOMIC, SCTP_UNCONFIRMED); |
2433 | if (!peer) | 2433 | if (!peer) |
@@ -2439,10 +2439,10 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc, | |||
2439 | break; | 2439 | break; |
2440 | case SCTP_PARAM_DEL_IP: | 2440 | case SCTP_PARAM_DEL_IP: |
2441 | /* ADDIP 4.3 D7) If a request is received to delete the | 2441 | /* ADDIP 4.3 D7) If a request is received to delete the |
2442 | * last remaining IP address of a peer endpoint, the receiver | 2442 | * last remaining IP address of a peer endpoint, the receiver |
2443 | * MUST send an Error Cause TLV with the error cause set to the | 2443 | * MUST send an Error Cause TLV with the error cause set to the |
2444 | * new error code 'Request to Delete Last Remaining IP Address'. | 2444 | * new error code 'Request to Delete Last Remaining IP Address'. |
2445 | */ | 2445 | */ |
2446 | pos = asoc->peer.transport_addr_list.next; | 2446 | pos = asoc->peer.transport_addr_list.next; |
2447 | if (pos->next == &asoc->peer.transport_addr_list) | 2447 | if (pos->next == &asoc->peer.transport_addr_list) |
2448 | return SCTP_ERROR_DEL_LAST_IP; | 2448 | return SCTP_ERROR_DEL_LAST_IP; |
@@ -2474,7 +2474,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc, | |||
2474 | return SCTP_ERROR_NO_ERROR; | 2474 | return SCTP_ERROR_NO_ERROR; |
2475 | } | 2475 | } |
2476 | 2476 | ||
2477 | /* Process an incoming ASCONF chunk with the next expected serial no. and | 2477 | /* Process an incoming ASCONF chunk with the next expected serial no. and |
2478 | * return an ASCONF_ACK chunk to be sent in response. | 2478 | * return an ASCONF_ACK chunk to be sent in response. |
2479 | */ | 2479 | */ |
2480 | struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | 2480 | struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, |
@@ -2494,19 +2494,19 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | |||
2494 | hdr = (sctp_addiphdr_t *)asconf->skb->data; | 2494 | hdr = (sctp_addiphdr_t *)asconf->skb->data; |
2495 | serial = ntohl(hdr->serial); | 2495 | serial = ntohl(hdr->serial); |
2496 | 2496 | ||
2497 | /* Skip the addiphdr and store a pointer to address parameter. */ | 2497 | /* Skip the addiphdr and store a pointer to address parameter. */ |
2498 | length = sizeof(sctp_addiphdr_t); | 2498 | length = sizeof(sctp_addiphdr_t); |
2499 | addr_param = (union sctp_addr_param *)(asconf->skb->data + length); | 2499 | addr_param = (union sctp_addr_param *)(asconf->skb->data + length); |
2500 | chunk_len -= length; | 2500 | chunk_len -= length; |
2501 | 2501 | ||
2502 | /* Skip the address parameter and store a pointer to the first | 2502 | /* Skip the address parameter and store a pointer to the first |
2503 | * asconf paramter. | 2503 | * asconf paramter. |
2504 | */ | 2504 | */ |
2505 | length = ntohs(addr_param->v4.param_hdr.length); | 2505 | length = ntohs(addr_param->v4.param_hdr.length); |
2506 | asconf_param = (sctp_addip_param_t *)((void *)addr_param + length); | 2506 | asconf_param = (sctp_addip_param_t *)((void *)addr_param + length); |
2507 | chunk_len -= length; | 2507 | chunk_len -= length; |
2508 | 2508 | ||
2509 | /* create an ASCONF_ACK chunk. | 2509 | /* create an ASCONF_ACK chunk. |
2510 | * Based on the definitions of parameters, we know that the size of | 2510 | * Based on the definitions of parameters, we know that the size of |
2511 | * ASCONF_ACK parameters are less than or equal to the twice of ASCONF | 2511 | * ASCONF_ACK parameters are less than or equal to the twice of ASCONF |
2512 | * paramters. | 2512 | * paramters. |
@@ -2537,7 +2537,7 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | |||
2537 | /* ADDIP 4.3 D11) When an endpoint receiving an ASCONF to add | 2537 | /* ADDIP 4.3 D11) When an endpoint receiving an ASCONF to add |
2538 | * an IP address sends an 'Out of Resource' in its response, it | 2538 | * an IP address sends an 'Out of Resource' in its response, it |
2539 | * MUST also fail any subsequent add or delete requests bundled | 2539 | * MUST also fail any subsequent add or delete requests bundled |
2540 | * in the ASCONF. | 2540 | * in the ASCONF. |
2541 | */ | 2541 | */ |
2542 | if (SCTP_ERROR_RSRC_LOW == err_code) | 2542 | if (SCTP_ERROR_RSRC_LOW == err_code) |
2543 | goto done; | 2543 | goto done; |
@@ -2548,12 +2548,12 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, | |||
2548 | length); | 2548 | length); |
2549 | chunk_len -= length; | 2549 | chunk_len -= length; |
2550 | } | 2550 | } |
2551 | 2551 | ||
2552 | done: | 2552 | done: |
2553 | asoc->peer.addip_serial++; | 2553 | asoc->peer.addip_serial++; |
2554 | 2554 | ||
2555 | /* If we are sending a new ASCONF_ACK hold a reference to it in assoc | 2555 | /* If we are sending a new ASCONF_ACK hold a reference to it in assoc |
2556 | * after freeing the reference to old asconf ack if any. | 2556 | * after freeing the reference to old asconf ack if any. |
2557 | */ | 2557 | */ |
2558 | if (asconf_ack) { | 2558 | if (asconf_ack) { |
2559 | if (asoc->addip_last_asconf_ack) | 2559 | if (asoc->addip_last_asconf_ack) |
@@ -2621,7 +2621,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, | |||
2621 | 2621 | ||
2622 | /* Get the corresponding ASCONF response error code from the ASCONF_ACK chunk | 2622 | /* Get the corresponding ASCONF response error code from the ASCONF_ACK chunk |
2623 | * for the given asconf parameter. If there is no response for this parameter, | 2623 | * for the given asconf parameter. If there is no response for this parameter, |
2624 | * return the error code based on the third argument 'no_err'. | 2624 | * return the error code based on the third argument 'no_err'. |
2625 | * ADDIP 4.1 | 2625 | * ADDIP 4.1 |
2626 | * A7) If an error response is received for a TLV parameter, all TLVs with no | 2626 | * A7) If an error response is received for a TLV parameter, all TLVs with no |
2627 | * response before the failed TLV are considered successful if not reported. | 2627 | * response before the failed TLV are considered successful if not reported. |
@@ -2645,7 +2645,7 @@ static __be16 sctp_get_asconf_response(struct sctp_chunk *asconf_ack, | |||
2645 | 2645 | ||
2646 | /* Skip the addiphdr from the asconf_ack chunk and store a pointer to | 2646 | /* Skip the addiphdr from the asconf_ack chunk and store a pointer to |
2647 | * the first asconf_ack parameter. | 2647 | * the first asconf_ack parameter. |
2648 | */ | 2648 | */ |
2649 | length = sizeof(sctp_addiphdr_t); | 2649 | length = sizeof(sctp_addiphdr_t); |
2650 | asconf_ack_param = (sctp_addip_param_t *)(asconf_ack->skb->data + | 2650 | asconf_ack_param = (sctp_addip_param_t *)(asconf_ack->skb->data + |
2651 | length); | 2651 | length); |
@@ -2696,14 +2696,14 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, | |||
2696 | 2696 | ||
2697 | /* Skip the chunkhdr and addiphdr from the last asconf sent and store | 2697 | /* Skip the chunkhdr and addiphdr from the last asconf sent and store |
2698 | * a pointer to address parameter. | 2698 | * a pointer to address parameter. |
2699 | */ | 2699 | */ |
2700 | length = sizeof(sctp_addip_chunk_t); | 2700 | length = sizeof(sctp_addip_chunk_t); |
2701 | addr_param = (union sctp_addr_param *)(asconf->skb->data + length); | 2701 | addr_param = (union sctp_addr_param *)(asconf->skb->data + length); |
2702 | asconf_len -= length; | 2702 | asconf_len -= length; |
2703 | 2703 | ||
2704 | /* Skip the address parameter in the last asconf sent and store a | 2704 | /* Skip the address parameter in the last asconf sent and store a |
2705 | * pointer to the first asconf paramter. | 2705 | * pointer to the first asconf paramter. |
2706 | */ | 2706 | */ |
2707 | length = ntohs(addr_param->v4.param_hdr.length); | 2707 | length = ntohs(addr_param->v4.param_hdr.length); |
2708 | asconf_param = (sctp_addip_param_t *)((void *)addr_param + length); | 2708 | asconf_param = (sctp_addip_param_t *)((void *)addr_param + length); |
2709 | asconf_len -= length; | 2709 | asconf_len -= length; |
@@ -2740,7 +2740,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, | |||
2740 | case SCTP_ERROR_INV_PARAM: | 2740 | case SCTP_ERROR_INV_PARAM: |
2741 | /* Disable sending this type of asconf parameter in | 2741 | /* Disable sending this type of asconf parameter in |
2742 | * future. | 2742 | * future. |
2743 | */ | 2743 | */ |
2744 | asoc->peer.addip_disabled_mask |= | 2744 | asoc->peer.addip_disabled_mask |= |
2745 | asconf_param->param_hdr.type; | 2745 | asconf_param->param_hdr.type; |
2746 | break; | 2746 | break; |
@@ -2754,7 +2754,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, | |||
2754 | 2754 | ||
2755 | /* Skip the processed asconf parameter and move to the next | 2755 | /* Skip the processed asconf parameter and move to the next |
2756 | * one. | 2756 | * one. |
2757 | */ | 2757 | */ |
2758 | length = ntohs(asconf_param->param_hdr.length); | 2758 | length = ntohs(asconf_param->param_hdr.length); |
2759 | asconf_param = (sctp_addip_param_t *)((void *)asconf_param + | 2759 | asconf_param = (sctp_addip_param_t *)((void *)asconf_param + |
2760 | length); | 2760 | length); |
@@ -2783,14 +2783,14 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, | |||
2783 | return retval; | 2783 | return retval; |
2784 | } | 2784 | } |
2785 | 2785 | ||
2786 | /* Make a FWD TSN chunk. */ | 2786 | /* Make a FWD TSN chunk. */ |
2787 | struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc, | 2787 | struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc, |
2788 | __u32 new_cum_tsn, size_t nstreams, | 2788 | __u32 new_cum_tsn, size_t nstreams, |
2789 | struct sctp_fwdtsn_skip *skiplist) | 2789 | struct sctp_fwdtsn_skip *skiplist) |
2790 | { | 2790 | { |
2791 | struct sctp_chunk *retval = NULL; | 2791 | struct sctp_chunk *retval = NULL; |
2792 | struct sctp_fwdtsn_chunk *ftsn_chunk; | 2792 | struct sctp_fwdtsn_chunk *ftsn_chunk; |
2793 | struct sctp_fwdtsn_hdr ftsn_hdr; | 2793 | struct sctp_fwdtsn_hdr ftsn_hdr; |
2794 | struct sctp_fwdtsn_skip skip; | 2794 | struct sctp_fwdtsn_skip skip; |
2795 | size_t hint; | 2795 | size_t hint; |
2796 | int i; | 2796 | int i; |