diff options
-rw-r--r-- | net/sctp/sm_make_chunk.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index ba76ceca2a4e..51c4d7fef1d2 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -113,15 +113,12 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code, | |||
113 | const void *payload, size_t paylen) | 113 | const void *payload, size_t paylen) |
114 | { | 114 | { |
115 | sctp_errhdr_t err; | 115 | sctp_errhdr_t err; |
116 | int padlen; | ||
117 | __u16 len; | 116 | __u16 len; |
118 | 117 | ||
119 | /* Cause code constants are now defined in network order. */ | 118 | /* Cause code constants are now defined in network order. */ |
120 | err.cause = cause_code; | 119 | err.cause = cause_code; |
121 | len = sizeof(sctp_errhdr_t) + paylen; | 120 | len = sizeof(sctp_errhdr_t) + paylen; |
122 | padlen = len % 4; | ||
123 | err.length = htons(len); | 121 | err.length = htons(len); |
124 | len += padlen; | ||
125 | chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err); | 122 | chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err); |
126 | sctp_addto_chunk(chunk, paylen, payload); | 123 | sctp_addto_chunk(chunk, paylen, payload); |
127 | } | 124 | } |