Apply go fix modernizations

This commit is contained in:
Ian Gulliver
2026-03-05 11:39:13 -08:00
parent 4278628690
commit d71b0cb850

View File

@@ -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: