Filter out reverse DNS names from mDNS hostname extraction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-25 09:30:55 -08:00
parent cc3d84b97e
commit 67f4f23192
3 changed files with 27 additions and 4 deletions

BIN
.config.yaml.swp Normal file

Binary file not shown.

View File

@@ -9,9 +9,20 @@ locations:
- "48:59:00:41:00:29" # Pixie Driver 8k Port 1 - "48:59:00:41:00:29" # Pixie Driver 8k Port 1
- "48:59:00:28:00:27" # Pixie Driver 8k Port 2 - "48:59:00:28:00:27" # Pixie Driver 8k Port 2
- "48:59:00:3c:00:3e" # Pixie Driver 8k Port 5 - "48:59:00:3c:00:3e" # Pixie Driver 8k Port 5
- ART12 - ART9 # Cyc
- ART13 - ART10 # Cyc
- ART14 - ART11 # Cyc
- ART12 # Cyc
- ART13 # Cyc
- ART14 # Cyc
- children:
- children:
- nodes:
- ART16 # R2X1
- nodes:
- ART20 # R2X2
- children: - children:
- nodes: - nodes:
@@ -89,11 +100,23 @@ locations:
- satellite-2 - satellite-2
- "Y001-MAIN2-L-d1e298" - "Y001-MAIN2-L-d1e298"
- "ac:44:f2:4e:87:2a" # MAIN2-L bridge interface - "ac:44:f2:4e:87:2a" # MAIN2-L bridge interface
- ART3 # Wash
- ART4 # Wash
- ART5 # Wash
- ART17 # Focus
- nodes:
- ART15 # R3X
- ART18 # Focus
- nodes: - nodes:
- satellite-3 - satellite-3
- "Y001-MAIN2-R-f0dd93" - "Y001-MAIN2-R-f0dd93"
- "ac:44:f2:4e:87:27" # MAIN2-R bridge interface - "ac:44:f2:4e:87:27" # MAIN2-R bridge interface
- ART6 # Wash
- ART7 # Wash
- ART8 # Wash
- ART19 # Focus
- name: Booth - name: Booth
children: children:

View File

@@ -132,7 +132,7 @@ func (t *Tendrils) processMDNSResponse(ifaceName string, srcIP net.IP, msg *dns.
if len(skaarhojNames) == 0 { if len(skaarhojNames) == 0 {
for aName, ip := range aRecords { for aName, ip := range aRecords {
hostname := strings.TrimSuffix(aName, ".local") hostname := strings.TrimSuffix(aName, ".local")
if hostname != "" && hostname != aName { if hostname != "" && hostname != aName && !strings.Contains(hostname, "in-addr") && !strings.Contains(hostname, "ip6.arpa") {
if t.DebugMDNS { if t.DebugMDNS {
log.Printf("[mdns] %s: %s -> %s", ifaceName, ip, hostname) log.Printf("[mdns] %s: %s -> %s", ifaceName, ip, hostname)
} }