Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96f7ef4d authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

sctp: remove the typedef sctp_authhdr_t



This patch is to remove the typedef sctp_authhdr_t, and
replace with struct sctp_authhdr 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 68d75469
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -693,15 +693,15 @@ struct sctp_addip_chunk {
 *   HMAC: n bytes (unsigned integer) This hold the result of the HMAC
 *      calculation.
 */
typedef struct sctp_authhdr {
struct sctp_authhdr {
	__be16 shkey_id;
	__be16 hmac_id;
	__u8   hmac[0];
} sctp_authhdr_t;
};

typedef struct sctp_auth_chunk {
	struct sctp_chunkhdr chunk_hdr;
	sctp_authhdr_t auth_hdr;
	struct sctp_authhdr auth_hdr;
} sctp_auth_chunk_t;

struct sctp_infox {
+4 −4
Original line number Diff line number Diff line
@@ -1282,7 +1282,7 @@ struct sctp_chunk *sctp_make_auth(const struct sctp_association *asoc)
		return NULL;

	retval = sctp_make_control(asoc, SCTP_CID_AUTH, 0,
			hmac_desc->hmac_len + sizeof(sctp_authhdr_t),
				   hmac_desc->hmac_len + sizeof(auth_hdr),
				   GFP_ATOMIC);
	if (!retval)
		return NULL;
@@ -1290,7 +1290,7 @@ struct sctp_chunk *sctp_make_auth(const struct sctp_association *asoc)
	auth_hdr.hmac_id = htons(hmac_desc->hmac_id);
	auth_hdr.shkey_id = htons(asoc->active_key_id);

	retval->subh.auth_hdr = sctp_addto_chunk(retval, sizeof(sctp_authhdr_t),
	retval->subh.auth_hdr = sctp_addto_chunk(retval, sizeof(auth_hdr),
						 &auth_hdr);

	hmac = skb_put_zero(retval->skb, hmac_desc->hmac_len);