diff mbox series

[v4,5/5] mptcp: v1 ADD_ADDR changes: use subflow_generate_hmac()

Message ID 20200311172600.4185-6-peter.krystad@linux.intel.com
State Superseded, archived
Delegated to: Paolo Abeni
Headers show
Series Add support for v1 of ADD_ADDR option | expand

Commit Message

Peter Krystad March 11, 2020, 5:26 p.m. UTC
Use subflow_generate_hmac() to create hmac from nonces.

squash-to: Add handling of outgoing MP_JOIN requests

Signed-off-by: Peter Krystad <peter.krystad@linux.intel.com>
---
 net/mptcp/subflow.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index a857ea8cf6ad..728367db6901 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -194,9 +194,9 @@  static bool subflow_thmac_valid(struct mptcp_subflow_context *subflow)
 	u8 hmac[MPTCPOPT_HMAC_LEN];
 	u64 thmac;
 
-	mptcp_crypto_hmac_sha(subflow->remote_key, subflow->local_key,
+	subflow_generate_hmac(subflow->remote_key, subflow->local_key,
 			      subflow->remote_nonce, subflow->local_nonce,
-			      (u32 *)hmac);
+			      hmac);
 
 	thmac = get_unaligned_be64(hmac);
 	pr_debug("subflow=%p, token=%u, thmac=%llu, subflow->thmac=%llu\n",
@@ -238,10 +238,10 @@  static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)
 			goto do_reset;
 		}
 
-		mptcp_crypto_hmac_sha(subflow->local_key, subflow->remote_key,
+		subflow_generate_hmac(subflow->local_key, subflow->remote_key,
 				      subflow->local_nonce,
 				      subflow->remote_nonce,
-				      (u32 *)subflow->hmac);
+				      subflow->hmac);
 
 		if (skb)
 			subflow->ssn_offset = TCP_SKB_CB(skb)->seq;