@@ -253,7 +253,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
253253 num_types = sp -> pf -> supported_addrs (sp , types );
254254
255255 chunksize = sizeof (init ) + addrs_len ;
256- chunksize += WORD_ROUND (SCTP_SAT_LEN (num_types ));
256+ chunksize += SCTP_PAD4 (SCTP_SAT_LEN (num_types ));
257257 chunksize += sizeof (ecap_param );
258258
259259 if (asoc -> prsctp_enable )
@@ -283,14 +283,14 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
283283 /* Add HMACS parameter length if any were defined */
284284 auth_hmacs = (sctp_paramhdr_t * )asoc -> c .auth_hmacs ;
285285 if (auth_hmacs -> length )
286- chunksize += WORD_ROUND (ntohs (auth_hmacs -> length ));
286+ chunksize += SCTP_PAD4 (ntohs (auth_hmacs -> length ));
287287 else
288288 auth_hmacs = NULL ;
289289
290290 /* Add CHUNKS parameter length */
291291 auth_chunks = (sctp_paramhdr_t * )asoc -> c .auth_chunks ;
292292 if (auth_chunks -> length )
293- chunksize += WORD_ROUND (ntohs (auth_chunks -> length ));
293+ chunksize += SCTP_PAD4 (ntohs (auth_chunks -> length ));
294294 else
295295 auth_chunks = NULL ;
296296
@@ -300,8 +300,8 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
300300
301301 /* If we have any extensions to report, account for that */
302302 if (num_ext )
303- chunksize += WORD_ROUND (sizeof (sctp_supported_ext_param_t ) +
304- num_ext );
303+ chunksize += SCTP_PAD4 (sizeof (sctp_supported_ext_param_t ) +
304+ num_ext );
305305
306306 /* RFC 2960 3.3.2 Initiation (INIT) (1)
307307 *
@@ -443,13 +443,13 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
443443
444444 auth_hmacs = (sctp_paramhdr_t * )asoc -> c .auth_hmacs ;
445445 if (auth_hmacs -> length )
446- chunksize += WORD_ROUND (ntohs (auth_hmacs -> length ));
446+ chunksize += SCTP_PAD4 (ntohs (auth_hmacs -> length ));
447447 else
448448 auth_hmacs = NULL ;
449449
450450 auth_chunks = (sctp_paramhdr_t * )asoc -> c .auth_chunks ;
451451 if (auth_chunks -> length )
452- chunksize += WORD_ROUND (ntohs (auth_chunks -> length ));
452+ chunksize += SCTP_PAD4 (ntohs (auth_chunks -> length ));
453453 else
454454 auth_chunks = NULL ;
455455
@@ -458,8 +458,8 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
458458 }
459459
460460 if (num_ext )
461- chunksize += WORD_ROUND (sizeof (sctp_supported_ext_param_t ) +
462- num_ext );
461+ chunksize += SCTP_PAD4 (sizeof (sctp_supported_ext_param_t ) +
462+ num_ext );
463463
464464 /* Now allocate and fill out the chunk. */
465465 retval = sctp_make_control (asoc , SCTP_CID_INIT_ACK , 0 , chunksize , gfp );
@@ -1390,7 +1390,7 @@ static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc,
13901390 struct sock * sk ;
13911391
13921392 /* No need to allocate LL here, as this is only a chunk. */
1393- skb = alloc_skb (WORD_ROUND (sizeof (sctp_chunkhdr_t ) + paylen ), gfp );
1393+ skb = alloc_skb (SCTP_PAD4 (sizeof (sctp_chunkhdr_t ) + paylen ), gfp );
13941394 if (!skb )
13951395 goto nodata ;
13961396
@@ -1482,7 +1482,7 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data)
14821482 void * target ;
14831483 void * padding ;
14841484 int chunklen = ntohs (chunk -> chunk_hdr -> length );
1485- int padlen = WORD_ROUND (chunklen ) - chunklen ;
1485+ int padlen = SCTP_PAD4 (chunklen ) - chunklen ;
14861486
14871487 padding = skb_put (chunk -> skb , padlen );
14881488 target = skb_put (chunk -> skb , len );
@@ -1900,7 +1900,7 @@ static int sctp_process_missing_param(const struct sctp_association *asoc,
19001900 struct __sctp_missing report ;
19011901 __u16 len ;
19021902
1903- len = WORD_ROUND (sizeof (report ));
1903+ len = SCTP_PAD4 (sizeof (report ));
19041904
19051905 /* Make an ERROR chunk, preparing enough room for
19061906 * returning multiple unknown parameters.
@@ -2098,9 +2098,9 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc,
20982098
20992099 if (* errp ) {
21002100 if (!sctp_init_cause_fixed (* errp , SCTP_ERROR_UNKNOWN_PARAM ,
2101- WORD_ROUND (ntohs (param .p -> length ))))
2101+ SCTP_PAD4 (ntohs (param .p -> length ))))
21022102 sctp_addto_chunk_fixed (* errp ,
2103- WORD_ROUND (ntohs (param .p -> length )),
2103+ SCTP_PAD4 (ntohs (param .p -> length )),
21042104 param .v );
21052105 } else {
21062106 /* If there is no memory for generating the ERROR
0 commit comments