Skip to content

Commit

Permalink
Validate cookie even in the established state
Browse files Browse the repository at this point in the history
Relates to pion/webrtc#1270
  • Loading branch information
enobufs committed Jul 15, 2020
1 parent e9599dc commit ee0cd3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion association.go
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,9 @@ func (a *Association) handleCookieEcho(c *chunkCookieEcho) []*packet {
default:
return nil
case established:
break
if !bytes.Equal(a.myCookie.cookie, c.cookie) {
return nil
}
case closed, cookieWait, cookieEchoed:
if !bytes.Equal(a.myCookie.cookie, c.cookie) {
return nil
Expand Down

0 comments on commit ee0cd3c

Please sign in to comment.