8000 `cache.fullPullMap` only works on first call when server skips Verify · Issue #263 · pion/dtls · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cache.fullPullMap only works on first call when server skips Verify #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sean-Der opened this issue Jun 16, 2020 · 0 comments · Fixed by #265
Closed

cache.fullPullMap only works on first call when server skips Verify #263

Sean-Der opened this issue Jun 16, 2020 · 0 comments · Fixed by #265

Comments

@Sean-Der
Copy link
Member

@at-wat I don't fully understand what is happening here, but just throwing out debugging so far.

In flight1parse we fall into the flight3Parse if we got a handshakeTypeServerHello. However this only works for me the first time. I don't get all the messages for flight3Parse to succeed, but it never gets executed again because flight1parse only gets a handshakeTypeServerHello once.

--- a/flight1handler.go
+++ b/flight1handler.go
@@ -2,6 +2,7 @@ package dtls
 
 import (
        "context"
+       "fmt"
 )
 
 func flight1Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert, error) {
@@ -11,6 +12,10 @@ func flight1Parse(ctx context.Context, c flightConn, state *State, cache *handsh
                handshakeCachePullRule{handshakeTypeHelloVerifyRequest, cfg.initialEpoch, false, true},
                handshakeCachePullRule{handshakeTypeServerHello, cfg.initialEpoch, false, true},
        )
+       fmt.Println(ok)
+       fmt.Println(msgs)
+
        if !ok {
                // No valid message received. Keep reading
                return 0, nil, nil
true
map[ServerHello:0xc0000b8070]

false
map[]

false
map[]

false
map[]

false
map[]

Do you know why this only succeeds the first time?

Sean-Der added a commit that referenced this issue Jun 16, 2020
Only update handshakeRecvSequence when the epoch successfully completes.
Before we would prematurely increment putting us in a state where it
would never complete.

Resolves #263 #262
Sean-Der added a commit that referenced this issue Jun 16, 2020
Only update handshakeRecvSequence when the flight successfully completes.
Before we would prematurely increment putting us in a state where it
would never complete.

Resolves #263 #262
Sean-Der added a commit that referenced this issue Jun 16, 2020
Only update handshakeRecvSequence when the flight successfully
completes. Before we would prematurely increment putting us in
a state where it would never complete.

Resolves #263 #262
Sean-Der added a commit that referenced this issue Jun 16, 2020
Only update handshakeRecvSequence when the flight successfully
completes. Before we would prematurely increment putting us in
a state where it would never complete.

Resolves #263 #262
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0