Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hurricanehrndz opened this issue Feb 20, 2025 · 0 comments · May be fixed by #3355
Open

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

hurricanehrndz opened this issue Feb 20, 2025 · 0 comments · May be fixed by #3355

Comments

@hurricanehrndz
Copy link
Contributor

hurricanehrndz commented Feb 20, 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
hurricanehrndz added a commit to hurricanehrndz/netbird that referenced this issue Feb 20, 2025
Network monitor should only trigger engine restarts when `route get`
actually changes. There are many other instances when unspecified
address get added to the system without actually affecting the real
default route.

fixes netbirdio#3352
@hurricanehrndz hurricanehrndz linked a pull request Feb 20, 2025 that will close this issue
6 tasks
hurricanehrndz added a commit to hurricanehrndz/netbird that referenced this issue Feb 20, 2025
Network monitor should only trigger engine restarts when `route get`
actually changes. There are many other instances when unspecified
address get added to the system without actually affecting the real
default route.

fixes netbirdio#3352
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant