Commit cb1844c4 authored by Xin Long's avatar Xin Long Committed by David S. Miller

sctp: remove the typedef sctp_initack_chunk_t

This patch is to remove the typedef sctp_initack_chunk_t, and
replace with struct sctp_initack_chunk in the places where it's
using this typedef.

It is also to use sizeof(variable) instead of sizeof(type).
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56eda01d
...@@ -336,7 +336,10 @@ struct sctp_hmac_algo_param { ...@@ -336,7 +336,10 @@ struct sctp_hmac_algo_param {
* The INIT ACK chunk is used to acknowledge the initiation of an SCTP * The INIT ACK chunk is used to acknowledge the initiation of an SCTP
* association. * association.
*/ */
typedef struct sctp_init_chunk sctp_initack_chunk_t; struct sctp_initack_chunk {
struct sctp_chunkhdr chunk_hdr;
struct sctp_inithdr init_hdr;
};
/* Section 3.3.3.1 State Cookie (7) */ /* Section 3.3.3.1 State Cookie (7) */
typedef struct sctp_cookie_param { typedef struct sctp_cookie_param {
......
...@@ -518,7 +518,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(struct net *net, ...@@ -518,7 +518,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(struct net *net,
return sctp_sf_violation_chunk(net, ep, asoc, type, arg, commands); return sctp_sf_violation_chunk(net, ep, asoc, type, arg, commands);
/* Make sure that the INIT-ACK chunk has a valid length */ /* Make sure that the INIT-ACK chunk has a valid length */
if (!sctp_chunk_length_valid(chunk, sizeof(sctp_initack_chunk_t))) if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_initack_chunk)))
return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
commands); commands);
/* Grab the INIT header. */ /* Grab the INIT header. */
...@@ -4453,11 +4453,10 @@ static sctp_disposition_t sctp_sf_abort_violation( ...@@ -4453,11 +4453,10 @@ static sctp_disposition_t sctp_sf_abort_violation(
/* Treat INIT-ACK as a special case during COOKIE-WAIT. */ /* Treat INIT-ACK as a special case during COOKIE-WAIT. */
if (chunk->chunk_hdr->type == SCTP_CID_INIT_ACK && if (chunk->chunk_hdr->type == SCTP_CID_INIT_ACK &&
!asoc->peer.i.init_tag) { !asoc->peer.i.init_tag) {
sctp_initack_chunk_t *initack; struct sctp_initack_chunk *initack;
initack = (sctp_initack_chunk_t *)chunk->chunk_hdr; initack = (struct sctp_initack_chunk *)chunk->chunk_hdr;
if (!sctp_chunk_length_valid(chunk, if (!sctp_chunk_length_valid(chunk, sizeof(*initack)))
sizeof(sctp_initack_chunk_t)))
abort->chunk_hdr->flags |= SCTP_CHUNK_FLAG_T; abort->chunk_hdr->flags |= SCTP_CHUNK_FLAG_T;
else { else {
unsigned int inittag; unsigned int inittag;
...@@ -6106,9 +6105,9 @@ static struct sctp_packet *sctp_ootb_pkt_new(struct net *net, ...@@ -6106,9 +6105,9 @@ static struct sctp_packet *sctp_ootb_pkt_new(struct net *net,
switch (chunk->chunk_hdr->type) { switch (chunk->chunk_hdr->type) {
case SCTP_CID_INIT_ACK: case SCTP_CID_INIT_ACK:
{ {
sctp_initack_chunk_t *initack; struct sctp_initack_chunk *initack;
initack = (sctp_initack_chunk_t *)chunk->chunk_hdr; initack = (struct sctp_initack_chunk *)chunk->chunk_hdr;
vtag = ntohl(initack->init_hdr.init_tag); vtag = ntohl(initack->init_hdr.init_tag);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment