diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 8d18f570c2e6..51c4d7fef1d2 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -65,8 +65,6 @@ | |||
65 | #include <net/sctp/sctp.h> | 65 | #include <net/sctp/sctp.h> |
66 | #include <net/sctp/sm.h> | 66 | #include <net/sctp/sm.h> |
67 | 67 | ||
68 | extern struct kmem_cache *sctp_chunk_cachep; | ||
69 | |||
70 | SCTP_STATIC | 68 | SCTP_STATIC |
71 | struct sctp_chunk *sctp_make_chunk(const struct sctp_association *asoc, | 69 | struct sctp_chunk *sctp_make_chunk(const struct sctp_association *asoc, |
72 | __u8 type, __u8 flags, int paylen); | 70 | __u8 type, __u8 flags, int paylen); |
@@ -115,15 +113,12 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code, | |||
115 | const void *payload, size_t paylen) | 113 | const void *payload, size_t paylen) |
116 | { | 114 | { |
117 | sctp_errhdr_t err; | 115 | sctp_errhdr_t err; |
118 | int padlen; | ||
119 | __u16 len; | 116 | __u16 len; |
120 | 117 | ||
121 | /* Cause code constants are now defined in network order. */ | 118 | /* Cause code constants are now defined in network order. */ |
122 | err.cause = cause_code; | 119 | err.cause = cause_code; |
123 | len = sizeof(sctp_errhdr_t) + paylen; | 120 | len = sizeof(sctp_errhdr_t) + paylen; |
124 | padlen = len % 4; | ||
125 | err.length = htons(len); | 121 | err.length = htons(len); |
126 | len += padlen; | ||
127 | 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); |
128 | sctp_addto_chunk(chunk, paylen, payload); | 123 | sctp_addto_chunk(chunk, paylen, payload); |
129 | } | 124 | } |
@@ -1454,7 +1449,6 @@ no_hmac: | |||
1454 | do_gettimeofday(&tv); | 1449 | do_gettimeofday(&tv); |
1455 | 1450 | ||
1456 | if (!asoc && tv_lt(bear_cookie->expiration, tv)) { | 1451 | if (!asoc && tv_lt(bear_cookie->expiration, tv)) { |
1457 | __u16 len; | ||
1458 | /* | 1452 | /* |
1459 | * Section 3.3.10.3 Stale Cookie Error (3) | 1453 | * Section 3.3.10.3 Stale Cookie Error (3) |
1460 | * | 1454 | * |