mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
- Move `util/grpc` and `util/net` to `client` so `internal` packages can be accessed - Add methods to return the next best interface after the NetBird interface. - Use `IP_UNICAST_IF` sock opt to force the outgoing interface for the NetBird `net.Dialer` and `net.ListenerConfig` to avoid routing loops. The interface is picked by the new route lookup method. - Some refactoring to avoid import cycles - Old behavior is available through `NB_USE_LEGACY_ROUTING=true` env var
43 lines
830 B
Go
43 lines
830 B
Go
//go:build android
|
|
|
|
package systemops
|
|
|
|
import (
|
|
"net"
|
|
"net/netip"
|
|
"runtime"
|
|
|
|
log "github.com/sirupsen/logrus"
|
|
|
|
"github.com/netbirdio/netbird/client/internal/statemanager"
|
|
)
|
|
|
|
func (r *SysOps) SetupRouting([]net.IP, *statemanager.Manager, bool) error {
|
|
return nil
|
|
}
|
|
|
|
func (r *SysOps) CleanupRouting(*statemanager.Manager, bool) error {
|
|
return nil
|
|
}
|
|
|
|
func (r *SysOps) AddVPNRoute(netip.Prefix, *net.Interface) error {
|
|
return nil
|
|
}
|
|
|
|
func (r *SysOps) RemoveVPNRoute(netip.Prefix, *net.Interface) error {
|
|
return nil
|
|
}
|
|
|
|
func (r *SysOps) removeFromRouteTable(netip.Prefix, Nexthop) error {
|
|
return nil
|
|
}
|
|
|
|
func EnableIPForwarding() error {
|
|
log.Infof("Enable IP forwarding is not implemented on %s", runtime.GOOS)
|
|
return nil
|
|
}
|
|
|
|
func IsAddrRouted(netip.Addr, []netip.Prefix) (bool, netip.Prefix) {
|
|
return false, netip.Prefix{}
|
|
}
|