diff options
-rw-r--r-- | conn/bind_std.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/conn/bind_std.go b/conn/bind_std.go index a842b12..0266d6b 100644 --- a/conn/bind_std.go +++ b/conn/bind_std.go @@ -229,7 +229,7 @@ func (s *StdNetBind) makeReceiveIPv4(pc *ipv4.PacketConn, conn *net.UDPConn) Rec sizes[i] = msg.N addrPort := msg.Addr.(*net.UDPAddr).AddrPort() ep := asEndpoint(addrPort) - getSrcFromControl(msg.OOB, ep) + getSrcFromControl(msg.OOB[:msg.NN], ep) eps[i] = ep } return numMsgs, nil @@ -262,7 +262,7 @@ func (s *StdNetBind) makeReceiveIPv6(pc *ipv6.PacketConn, conn *net.UDPConn) Rec sizes[i] = msg.N addrPort := msg.Addr.(*net.UDPAddr).AddrPort() ep := asEndpoint(addrPort) - getSrcFromControl(msg.OOB, ep) + getSrcFromControl(msg.OOB[:msg.NN], ep) eps[i] = ep } return numMsgs, nil |