aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 9c30fa55051e..a9663b49ea54 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -460,12 +460,12 @@ static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu)
460 * there is room for a param header too. 460 * there is room for a param header too.
461 */ 461 */
462#define sctp_walk_params(pos, chunk, member)\ 462#define sctp_walk_params(pos, chunk, member)\
463_sctp_walk_params((pos), (chunk), WORD_ROUND(ntohs((chunk)->chunk_hdr.length)), member) 463_sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member)
464 464
465#define _sctp_walk_params(pos, chunk, end, member)\ 465#define _sctp_walk_params(pos, chunk, end, member)\
466for (pos.v = chunk->member;\ 466for (pos.v = chunk->member;\
467 pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\ 467 pos.v <= (void *)chunk + end - sizeof(sctp_paramhdr_t) &&\
468 pos.v <= (void *)chunk + end - WORD_ROUND(ntohs(pos.p->length)) &&\ 468 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\
469 ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\ 469 ntohs(pos.p->length) >= sizeof(sctp_paramhdr_t);\
470 pos.v += WORD_ROUND(ntohs(pos.p->length))) 470 pos.v += WORD_ROUND(ntohs(pos.p->length)))
471 471
@@ -476,7 +476,7 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length))
476for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ 476for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \
477 sizeof(sctp_chunkhdr_t));\ 477 sizeof(sctp_chunkhdr_t));\
478 (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\ 478 (void *)err <= (void *)chunk_hdr + end - sizeof(sctp_errhdr_t) &&\
479 (void *)err <= (void *)chunk_hdr + end - WORD_ROUND(ntohs(err->length)) &&\ 479 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\
480 ntohs(err->length) >= sizeof(sctp_errhdr_t); \ 480 ntohs(err->length) >= sizeof(sctp_errhdr_t); \
481 err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length)))) 481 err = (sctp_errhdr_t *)((void *)err + WORD_ROUND(ntohs(err->length))))
482 482