mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-23 14:28:51 +01:00
split systemops for operating systems and add linux
This commit is contained in:
parent
dad5501a44
commit
c8b4c08139
@ -55,11 +55,15 @@ func getExistingRIBRouteGateway(prefix netip.Prefix) (net.IP, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
_, gateway, _, err := r.Route(prefix.Addr().AsSlice())
|
_, gateway, preferredSrc, err := r.Route(prefix.Addr().AsSlice())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("getting routes returned an error: %v", err)
|
log.Errorf("getting routes returned an error: %v", err)
|
||||||
return nil, errRouteNotFound
|
return nil, errRouteNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if gateway == nil {
|
||||||
|
return preferredSrc, nil
|
||||||
|
}
|
||||||
|
|
||||||
return gateway, nil
|
return gateway, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user