summaryrefslogtreecommitdiffhomepage
path: root/pkg/dhcp/dhcp_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/dhcp/dhcp_test.go')
-rw-r--r--pkg/dhcp/dhcp_test.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/dhcp/dhcp_test.go b/pkg/dhcp/dhcp_test.go
index 67814683a..a187c5c2a 100644
--- a/pkg/dhcp/dhcp_test.go
+++ b/pkg/dhcp/dhcp_test.go
@@ -42,11 +42,7 @@ func createStack(t *testing.T) *stack.Stack {
go func() {
for pkt := range linkEP.C {
- v := make(buffer.View, len(pkt.Header)+len(pkt.Payload))
- copy(v, pkt.Header)
- copy(v[len(pkt.Header):], pkt.Payload)
- vv := v.ToVectorisedView([1]buffer.View{})
- linkEP.Inject(pkt.Proto, &vv)
+ linkEP.Inject(pkt.Proto, buffer.NewVectorisedView(len(pkt.Header)+len(pkt.Payload), []buffer.View{pkt.Header, pkt.Payload}))
}
}()