Fix review issues

This commit is contained in:
Viktor Liu
2025-07-09 12:44:34 +02:00
parent 4cff2a09a3
commit 3d4ddd53f3
2 changed files with 3 additions and 3 deletions

View File

@@ -226,7 +226,7 @@ func (s *ICEBind) createReceiverFn(pc wgConn.BatchReader, conn *net.UDPConn, rxO
msg := &(*msgs)[i] msg := &(*msgs)[i]
// todo: handle err // todo: handle err
ok, _ := s.filterOutStunMessages(msg.Buffers, msg.N, msg.Addr, isIPv6) ok, _ := s.filterOutStunMessages(msg.Buffers, msg.N, msg.Addr)
if ok { if ok {
continue continue
} }
@@ -253,7 +253,7 @@ func (s *ICEBind) createReceiverFn(pc wgConn.BatchReader, conn *net.UDPConn, rxO
} }
} }
func (s *ICEBind) filterOutStunMessages(buffers [][]byte, n int, addr net.Addr, isIPv6 bool) (bool, error) { func (s *ICEBind) filterOutStunMessages(buffers [][]byte, n int, addr net.Addr) (bool, error) {
for i := range buffers { for i := range buffers {
if !stun.IsMessage(buffers[i]) { if !stun.IsMessage(buffers[i]) {
continue continue

View File

@@ -162,7 +162,7 @@ func (s *SharedSocket) LocalAddr() net.Addr {
} }
if s.conn6 != nil { if s.conn6 != nil {
return &net.UDPAddr{ return &net.UDPAddr{
IP: net.IPv6zero, IP: net.IPv6unspecified,
Port: s.port, Port: s.port,
} }
} }