On macOS the route monitor triggers on non gw changes #1636

Open
opened 2025-11-20 06:03:54 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @hurricanehrndz on GitHub (Feb 19, 2025).

Describe the problem

client/internal/networkmonitor/monitor_bsd.go triggers the callback whenever a default route (0.0.0.0 or ::) gets added or deleted. This would be okay as long as the change would be confirmed against the interface stored in the nexthop. There are many system actions that could erroneously trigger the callback from the network monitor, for example:

  • when you start or stop a VM
  • when you turn on and/or off an interface other then the primary

The reason for this is because of the current check

To Reproduce

Steps to reproduce the behavior:

  1. Connect
  2. Start a VM with UTM

Expected behavior
Do not restart the engine unless the default route that is added or remove matches the interface of the nexthop

Are you using NetBird Cloud?

N/A

NetBird version

Any

Additional context

Logs

Network monitor: default route changed: via invalid IP, interface bridge100
Originally created by @hurricanehrndz on GitHub (Feb 19, 2025). **Describe the problem** `client/internal/networkmonitor/monitor_bsd.go` triggers the callback whenever a default route (0.0.0.0 or ::) gets added or deleted. This would be okay as long as the change would be confirmed against the interface stored in the nexthop. There are many system actions that could erroneously trigger the callback from the network monitor, for example: - when you start or stop a VM - when you turn on and/or off an interface other then the primary The reason for this is because of the [current check](https://github.com/netbirdio/netbird/blob/main/client/internal/networkmonitor/monitor_bsd.go#L77) **To Reproduce** Steps to reproduce the behavior: 1. Connect 2. Start a VM with UTM **Expected behavior** Do not restart the engine unless the default route that is added or remove matches the interface of the nexthop **Are you using NetBird Cloud?** N/A **NetBird version** Any **Additional context** Logs ``` Network monitor: default route changed: via invalid IP, interface bridge100 ```
saavagebueno added the triage-needed label 2025-11-20 06:03:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1636