Skip to content

Commit

Permalink
Fix ChannelBind response
Browse files Browse the repository at this point in the history
Resolves #71
  • Loading branch information
enobufs authored and Sean-Der committed Jul 4, 2019
1 parent 8c72997 commit 3bc0fff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion turn.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,11 @@ func (s *Server) handleChannelBindRequest(conn net.PacketConn, srcAddr net.Addr,
return errorSend(err, stun.CodeBadRequest)
}

return buildAndSend(conn, srcAddr, &stun.Message{TransactionID: m.TransactionID}, stun.BindingSuccess, messageIntegrity)
return buildAndSend(conn, srcAddr, &stun.Message{TransactionID: m.TransactionID}, stun.NewType(stun.MethodChannelBind, stun.ClassSuccessResponse), messageIntegrity)
}

func (s *Server) handleChannelData(conn net.PacketConn, srcAddr net.Addr, c *turn.ChannelData) error {
s.log.Debugf("received ChannelData from %s", srcAddr.String())
dstAddr := conn.LocalAddr()
a := s.manager.GetAllocation(&allocation.FiveTuple{
SrcAddr: srcAddr,
Expand Down

0 comments on commit 3bc0fff

Please sign in to comment.