Skip to content

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

Open
@hurricanehrndz

Description

@hurricanehrndz

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions