Apply go fix modernizations
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net"
|
"net"
|
||||||
|
"slices"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -207,10 +208,8 @@ func (c *Conn) isQuery(packet gopacket.Packet) bool {
|
|||||||
}
|
}
|
||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
defer c.mu.Unlock()
|
defer c.mu.Unlock()
|
||||||
for _, groupIP := range c.groups {
|
if slices.ContainsFunc(c.groups, igmp.GroupAddress.Equal) {
|
||||||
if igmp.GroupAddress.Equal(groupIP) {
|
return true
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case *layers.IGMP:
|
case *layers.IGMP:
|
||||||
|
|||||||
Reference in New Issue
Block a user