fix dante discovery bugs: filter .in-addr names, dedupe multicast flows, fix unicast channel numbers

This commit is contained in:
Ian Gulliver
2026-01-23 16:28:41 -08:00
parent 66f98075e4
commit c694efade5
2 changed files with 7 additions and 2 deletions

View File

@@ -410,7 +410,7 @@ func (t *Tendrils) queryDanteSubscriptions(conn *net.UDPConn, ip net.IP, rxCount
break
}
rxChannelNum := int(binary.BigEndian.Uint16(resp[recordOffset : recordOffset+2]))
rxChannelNum := idx + 1
txChannelOffset := int(binary.BigEndian.Uint16(resp[recordOffset+4 : recordOffset+6]))
txDeviceOffset := int(binary.BigEndian.Uint16(resp[recordOffset+6 : recordOffset+8]))
@@ -468,6 +468,7 @@ func (t *Tendrils) probeDanteDeviceWithPort(ip net.IP, port int) {
t.nodes.Update(nil, nil, []net.IP{ip}, "", info.Name, "dante-control")
}
needIGMPFallback := info.HasMulticast && info.Name != ""
for _, sub := range info.Subscriptions {
if t.DebugDante {
log.Printf("[dante] %s: subscription rx=%d -> %s@%s",
@@ -479,10 +480,11 @@ func (t *Tendrils) probeDanteDeviceWithPort(ip net.IP, port int) {
channelInfo = fmt.Sprintf("%s->%d", sub.TxChannelName, sub.RxChannel)
}
t.danteFlows.Update(sub.TxDeviceName, info.Name, channelInfo)
needIGMPFallback = false
}
}
if info.HasMulticast && info.Name != "" {
if needIGMPFallback {
groups := t.nodes.GetDanteMulticastGroups(ip)
for _, groupIP := range groups {
sourceName := t.nodes.GetDanteTxDeviceInGroup(groupIP)

View File

@@ -28,6 +28,9 @@ func extractDanteName(s string) string {
if at := strings.LastIndex(name, "@"); at >= 0 {
name = name[at+1:]
}
if strings.Contains(name, ".in-addr") {
return ""
}
return name
}