Skip to content

Commit

Permalink
Chore: use renamed buffer pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
xjasonlyu committed Jun 5, 2023
1 parent 4868427 commit 7ab86fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/device/iobased/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io"
"sync"

"gvisor.dev/gvisor/pkg/bufferv2"
"gvisor.dev/gvisor/pkg/buffer"
"gvisor.dev/gvisor/pkg/tcpip"
"gvisor.dev/gvisor/pkg/tcpip/header"
"gvisor.dev/gvisor/pkg/tcpip/link/channel"
Expand Down Expand Up @@ -110,7 +110,7 @@ func (e *Endpoint) dispatchLoop(cancel context.CancelFunc) {
}

pkt := stack.NewPacketBuffer(stack.PacketBufferOptions{
Payload: bufferv2.MakeWithData(data[offset : offset+n]),
Payload: buffer.MakeWithData(data[offset : offset+n]),
})

switch header.IPVersion(data[offset:]) {
Expand Down Expand Up @@ -142,7 +142,7 @@ func (e *Endpoint) writePacket(pkt stack.PacketBufferPtr) tcpip.Error {
buf := pkt.ToBuffer()
defer buf.Release()
if e.offset != 0 {
v := bufferv2.NewViewWithData(make([]byte, e.offset))
v := buffer.NewViewWithData(make([]byte, e.offset))
_ = buf.Prepend(v)
}

Expand Down

0 comments on commit 7ab86fd

Please sign in to comment.