From 75d2992cdeae6229813936ae33269363165a2cba Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Wed, 29 Jun 2022 22:39:38 +0000
Subject: [PATCH] Fix rekey bug. You must send the new session id on
 confirmation, not the source ID

---
 keyExchange/trigger.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/keyExchange/trigger.go b/keyExchange/trigger.go
index fcdb71aa9..97e377c62 100644
--- a/keyExchange/trigger.go
+++ b/keyExchange/trigger.go
@@ -9,6 +9,7 @@ package keyExchange
 
 import (
 	"fmt"
+
 	"github.com/cloudflare/circl/dh/sidh"
 	"github.com/golang/protobuf/proto"
 	"github.com/pkg/errors"
@@ -106,7 +107,7 @@ func handleTrigger(sess *storage.Session, net interfaces.NetworkManager,
 	//Send the Confirmation Message
 	//build the payload
 	payload, err := proto.Marshal(&RekeyConfirm{
-		SessionID: session.GetSource().Marshal(),
+		SessionID: session.GetID().Marshal(),
 	})
 
 	//If the payload cannot be marshaled, panic
-- 
GitLab