mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-26 01:53:42 +01:00
19 lines
445 B
Go
19 lines
445 B
Go
|
//go:build darwin || dragonfly || netbsd || openbsd
|
||
|
|
||
|
package systemops
|
||
|
|
||
|
import "syscall"
|
||
|
|
||
|
// filterRoutesByFlags - return true if need to ignore such route message because it consists specific flags.
|
||
|
func filterRoutesByFlags(routeMessageFlags int) bool {
|
||
|
if routeMessageFlags&syscall.RTF_UP == 0 {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
if routeMessageFlags&(syscall.RTF_REJECT|syscall.RTF_BLACKHOLE|syscall.RTF_WASCLONED) != 0 {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
return false
|
||
|
}
|