sessionid.patch 711 B

1234567891011121314151617181920212223242526
  1. From 4da67951864128358459681399dd208c49d5d001 Mon Sep 17 00:00:00 2001
  2. From: Rod Hynes <rod-hynes@users.noreply.github.com>
  3. Date: Mon, 12 Aug 2019 17:06:06 -0400
  4. Subject: [PATCH] Fix all-zeroes SessionID (#31)
  5. ---
  6. u_conn.go | 2 +-
  7. 1 file changed, 1 insertion(+), 1 deletion(-)
  8. diff --git a/u_conn.go b/u_conn.go
  9. index 9079460..2706373 100644
  10. --- a/u_conn.go
  11. +++ b/u_conn.go
  12. @@ -121,7 +121,7 @@ func (uconn *UConn) SetSessionState(session *ClientSessionState) error {
  13. }
  14. }
  15. var sessionID [32]byte
  16. - _, err := io.ReadFull(uconn.config.rand(), uconn.HandshakeState.Hello.SessionId)
  17. + _, err := io.ReadFull(uconn.config.rand(), sessionID[:])
  18. if err != nil {
  19. return err
  20. }
  21. --
  22. 2.22.0