mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-16 18:11:58 +02:00
[client] Add rootless container and fix client routes in netstack mode (#3150)
This commit is contained in:
@ -17,6 +17,7 @@ import (
|
||||
|
||||
nberrors "github.com/netbirdio/netbird/client/errors"
|
||||
"github.com/netbirdio/netbird/client/iface"
|
||||
"github.com/netbirdio/netbird/client/iface/netstack"
|
||||
"github.com/netbirdio/netbird/client/internal/routemanager/refcounter"
|
||||
"github.com/netbirdio/netbird/client/internal/routemanager/util"
|
||||
"github.com/netbirdio/netbird/client/internal/routemanager/vars"
|
||||
@ -62,6 +63,17 @@ func (r *SysOps) setupRefCounter(initAddresses []net.IP, stateManager *statemana
|
||||
r.removeFromRouteTable,
|
||||
)
|
||||
|
||||
if netstack.IsEnabled() {
|
||||
refCounter = refcounter.New(
|
||||
func(netip.Prefix, struct{}) (Nexthop, error) {
|
||||
return Nexthop{}, refcounter.ErrIgnore
|
||||
},
|
||||
func(netip.Prefix, Nexthop) error {
|
||||
return nil
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
r.refCounter = refCounter
|
||||
|
||||
return r.setupHooks(initAddresses, stateManager)
|
||||
|
Reference in New Issue
Block a user