Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions virtcontainers/pkg/hyperstart/hyperstart.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,8 @@ func ReadCtlMessage(conn net.Conn) (*DecodedMessage, error) {
// hyperstart control serial link, use SendCtlMessage.
func (h *Hyperstart) WriteCtlMessage(conn net.Conn, m *DecodedMessage) error {
length := len(m.Message) + CtlHdrSize
// XXX: Support sending messages by chunks to support messages over
// 10240 bytes. That limit is from hyperstart src/init.c,
// hyper_channel_ops, rbuf_size.
if length > 10240 {
return fmt.Errorf("message too long %d", length)
}
// Since hyper_ctlfd_read() can realloc buffer, we don't limit 10240
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, you're talking about hyperstart here but Clear Containers uses it's own version of hyperstart, that is called cc-agent, and I don't think this work...

// message size.
msg := make([]byte, length)
binary.BigEndian.PutUint32(msg[:], m.Code)
binary.BigEndian.PutUint32(msg[CtlHdrLenOffset:], uint32(length))
Expand Down