mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
Fix review issues
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user