summaryrefslogtreecommitdiffhomepage
path: root/conn
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-03-24 16:20:16 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2023-03-24 16:20:16 +0100
commit6a07b2a355f93fb28d37d03ae5f2c0019cdb9943 (patch)
treeb6de72f73d06f70a5f571d7381c0c7b85587d387 /conn
parent334b605e726db70fdba2740ba2b48fd72490cc44 (diff)
conn: use ipv6 message pool for ipv6 receiving
Looks like a simple copy&paste error. Fixes: 9e2f386 ("conn, device, tun: implement vectorized I/O on Linux") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conn')
-rw-r--r--conn/bind_std.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/conn/bind_std.go b/conn/bind_std.go
index 491e571..ab2bd85 100644
--- a/conn/bind_std.go
+++ b/conn/bind_std.go
@@ -243,8 +243,8 @@ func (s *StdNetBind) makeReceiveIPv4(pc *ipv4.PacketConn, conn *net.UDPConn) Rec
func (s *StdNetBind) makeReceiveIPv6(pc *ipv6.PacketConn, conn *net.UDPConn) ReceiveFunc {
return func(bufs [][]byte, sizes []int, eps []Endpoint) (n int, err error) {
- msgs := s.ipv4MsgsPool.Get().(*[]ipv6.Message)
- defer s.ipv4MsgsPool.Put(msgs)
+ msgs := s.ipv6MsgsPool.Get().(*[]ipv6.Message)
+ defer s.ipv6MsgsPool.Put(msgs)
for i := range bufs {
(*msgs)[i].Buffers[0] = bufs[i]
}