mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-18 19:09:09 +02:00
[client] Add detailed routes and resolved IPs to debug bundle (#4141)
This commit is contained in:
@@ -10,6 +10,25 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// IPRule contains IP rule information for debugging
|
||||
type IPRule struct {
|
||||
Priority int
|
||||
From netip.Prefix
|
||||
To netip.Prefix
|
||||
IIF string
|
||||
OIF string
|
||||
Table string
|
||||
Action string
|
||||
Mark uint32
|
||||
Mask uint32
|
||||
TunID uint32
|
||||
Goto uint32
|
||||
Flow uint32
|
||||
SuppressPlen int
|
||||
SuppressIFL int
|
||||
Invert bool
|
||||
}
|
||||
|
||||
func (r *SysOps) AddVPNRoute(prefix netip.Prefix, intf *net.Interface) error {
|
||||
if err := r.validateRoute(prefix); err != nil {
|
||||
return err
|
||||
@@ -32,3 +51,9 @@ func EnableIPForwarding() error {
|
||||
func hasSeparateRouting() ([]netip.Prefix, error) {
|
||||
return GetRoutesFromTable()
|
||||
}
|
||||
|
||||
// GetIPRules returns IP rules for debugging (not supported on non-Linux platforms)
|
||||
func GetIPRules() ([]IPRule, error) {
|
||||
log.Infof("IP rules collection is not supported on %s", runtime.GOOS)
|
||||
return []IPRule{}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user