2022-08-24 04:00:06 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2023-06-30 16:06:52 +00:00
|
|
|
// NOTE: linux_{arm64, x86} are the only two currently supported archs due to missing
|
2022-08-24 04:00:06 +00:00
|
|
|
// support in upstream dependencies.
|
|
|
|
|
2023-06-30 16:06:52 +00:00
|
|
|
// TODO(#8502): add support for more architectures
|
|
|
|
//go:build !linux || (linux && !(arm64 || amd64))
|
2022-08-24 04:00:06 +00:00
|
|
|
|
|
|
|
package linuxfw
|
|
|
|
|
|
|
|
import (
|
2023-06-16 18:54:58 +00:00
|
|
|
"errors"
|
|
|
|
|
2022-08-24 04:00:06 +00:00
|
|
|
"tailscale.com/types/logger"
|
|
|
|
)
|
|
|
|
|
2023-06-16 18:54:58 +00:00
|
|
|
// ErrUnsupported is the error returned from all functions on non-Linux
|
|
|
|
// platforms.
|
|
|
|
var ErrUnsupported = errors.New("linuxfw:unsupported")
|
|
|
|
|
2022-08-24 04:00:06 +00:00
|
|
|
// DebugNetfilter is not supported on non-Linux platforms.
|
|
|
|
func DebugNetfilter(logf logger.Logf) error {
|
|
|
|
return ErrUnsupported
|
|
|
|
}
|
|
|
|
|
|
|
|
// DetectNetfilter is not supported on non-Linux platforms.
|
|
|
|
func DetectNetfilter() (int, error) {
|
|
|
|
return 0, ErrUnsupported
|
|
|
|
}
|
|
|
|
|
|
|
|
// DebugIptables is not supported on non-Linux platforms.
|
|
|
|
func DebugIptables(logf logger.Logf) error {
|
|
|
|
return ErrUnsupported
|
|
|
|
}
|
|
|
|
|
|
|
|
// DetectIptables is not supported on non-Linux platforms.
|
|
|
|
func DetectIptables() (int, error) {
|
|
|
|
return 0, ErrUnsupported
|
|
|
|
}
|