Skip to content

Commit 6a07b2a

Browse files
committed
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 <[email protected]>
1 parent 334b605 commit 6a07b2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

conn/bind_std.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ func (s *StdNetBind) makeReceiveIPv4(pc *ipv4.PacketConn, conn *net.UDPConn) Rec
243243

244244
func (s *StdNetBind) makeReceiveIPv6(pc *ipv6.PacketConn, conn *net.UDPConn) ReceiveFunc {
245245
return func(bufs [][]byte, sizes []int, eps []Endpoint) (n int, err error) {
246-
msgs := s.ipv4MsgsPool.Get().(*[]ipv6.Message)
247-
defer s.ipv4MsgsPool.Put(msgs)
246+
msgs := s.ipv6MsgsPool.Get().(*[]ipv6.Message)
247+
defer s.ipv6MsgsPool.Put(msgs)
248248
for i := range bufs {
249249
(*msgs)[i].Buffers[0] = bufs[i]
250250
}

0 commit comments

Comments
 (0)