Skip to content

fix: verify macOS multicast route points to loopback#1502

Merged
spomichter merged 1 commit intodevfrom
summer/fix/macos-multicast-route-check
Mar 10, 2026
Merged

fix: verify macOS multicast route points to loopback#1502
spomichter merged 1 commit intodevfrom
summer/fix/macos-multicast-route-check

Conversation

@SUMMERxYANG
Copy link
Contributor

Problem

Multicast configurator checks if a 224.0.0.0/4 route exists but not which interface it's on. On macOS this route defaults to en0, so the check passes but cross-process LCM communication fails silently.

Solution

Verify the route line contains lo0, not just that it exists.

Breaking Changes

None

Contributor License Agreement

  • I have read and approved the CLA.

The multicast configurator checked whether a 224.0.0.0/4 route existed
but not which interface it was on. On macOS the route often exists on
en0, causing cross-process LCM communication to fail silently.
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This PR correctly fixes a silent LCM communication failure on macOS where MulticastConfiguratorMacOS.check() was returning True as long as any 224.0.0.0/4 route existed — even when it pointed to en0 instead of lo0. The fix now iterates over netstat -nr output line by line and only returns True when both the multicast prefix and the loopback interface name appear on the same line.

Changes:

  • MulticastConfiguratorMacOS.check() now verifies the 224/4 route points to self.loopback_interface (lo0 by default), not just that it exists.
  • The comment block was updated to explain why the interface check is needed.

The fix is minimal, targeted, and directly solves the stated problem with no breaking changes.

Confidence Score: 5/5

  • Safe to merge. The fix correctly addresses the reported bug with a simple, targeted change and no breaking changes.
  • The PR solves a concrete cross-platform bug: the multicast configurator now verifies the route points to the loopback interface, not just that it exists. The logic change is minimal and directly fixes the stated problem. The code follows the existing patterns in the Linux configurator. No blocking issues identified.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/protocol/service/system_configurator/lcm.py The MulticastConfiguratorMacOS.check() method now correctly verifies that the 224.0.0.0/4 multicast route points to the loopback interface (lo0), not just that the route exists. The fix iterates line-by-line through netstat -nr output and returns True only when both the multicast prefix and loopback interface are found on the same line. The change is minimal, focused, and solves the stated problem.

Last reviewed commit: 3c1149d

@spomichter
Copy link
Contributor

awesomg great catch @SUMMERxYANG

@spomichter spomichter merged commit ec7d5ae into dev Mar 10, 2026
12 checks passed
@spomichter spomichter deleted the summer/fix/macos-multicast-route-check branch March 10, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants