SCTP: remove useless function sctp_auth_asoc_get_hmac()
Subsystems (2)
PATCH 1/1 SCTP: remove useless function sctp_auth_asoc_get_hmac()
Since we have do a strict check of HMAC-ALGO parameter while establish the association, the function sctp_auth_asoc_get_hmac() become useless.
This patch remove function sctp_auth_asoc_get_hmac().
include/net/sctp/auth.h +0 -1
@@ -99,7 +99,6 @@ int sctp_auth_asoc_copy_shkeys(const strint sctp_auth_init_hmacs (struct sctp_endpoint *ep,gfp_t gfp);void sctp_auth_destroy_hmacs (struct crypto_hash *auth_hmacs[]);struct sctp_hmac *sctp_auth_get_hmac (__u16 hmac_id); -struct sctp_hmac *sctp_auth_asoc_get_hmac (const struct sctp_association *asoc);void sctp_auth_asoc_set_default_hmac (struct sctp_association *asoc,struct sctp_hmac_algo_param *hmacs); int sctp_auth_asoc_verify_hmac_id(const struct sctp_association *asoc,
net/sctp/auth.c +0 -46
52 lines not on this page · raw message
net/sctp/chunk.c +1 -1
@@ -199,7 +199,7 @@ struct sctp_datamsg *sctp_datamsg_from_u* DATA. */ if (sctp_auth_send_cid (SCTP_CID_DATA , asoc)) { -struct sctp_hmac *hmac_desc =sctp_auth_asoc_get_hmac (asoc); +struct sctp_hmac *hmac_desc =sctp_auth_get_hmac (asoc->default_hmac_id);if (hmac_desc) max -= WORD_ROUND(sizeof(sctp_auth_chunk_t) +
net/sctp/sm_make_chunk.c +1 -1
@@ -1118,7 +1118,7 @@ struct sctp_chunk *sctp_make_auth(const__u8 *hmac;/* Get the first hmac that the peer told us to use */ - hmac_desc =sctp_auth_asoc_get_hmac (asoc); + hmac_desc =sctp_auth_get_hmac (asoc->default_hmac_id);if (unlikely (!hmac_desc))return NULL ;
David Miller
maintainerFrom: Wei Yongjun <[email protected]>
Date: Wed, 02 Apr 2008 16:07:10 +0800
Quoted 6 lines
Since we have do a strict check of HMAC-ALGO parameter while establish the association, the function
sctp_auth_asoc_get_hmac()become useless.This patch remove function
sctp_auth_asoc_get_hmac().Signed-off-by Wei Yongjun <[email protected]>
After your change nothing uses the default_hmac_id any longer.
Surely it is useful for some purpose?
Quoted 6 lines · David Miller
From: Wei Yongjun <[email protected]>
Date: Wed, 02 Apr 2008 16:07:10 +0800Quoted 3 lines
Since we have do a strict check of HMAC-ALGO parameter while establish the association, the function
sctp_auth_asoc_get_hmac()become useless.
Quoted 8 lines
Quoted 3 lines
This patch remove function
sctp_auth_asoc_get_hmac().Signed-off-by Wei Yongjun <[email protected]>After your change nothing uses the
default_hmac_idany longer.Surely it is useful for some purpose?
Hi David
Yes, it is still useful and still used in the patch
Quoted 1 line
+
hmac_desc=sctp_auth_get_hmac(asoc->default_hmac_id);
However, this patch depends on another patch:
[SCTP]: Add check for hmac_algo parameter in sctp_verify_param()
That I have queued and was verifying along with some others.
I'll send them out today.
-vlad