mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
243ce6ccc1
This change is introducing new netfilterRunner interface and moving iptables manipulation to a lower leveled iptables runner. For #391 Signed-off-by: KevinLiang10 <kevinliang@tailscale.com>
40 lines
990 B
Go
40 lines
990 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// NOTE: linux_{386,loong64,arm,armbe} are currently unsupported due to missing
|
|
// support in upstream dependencies.
|
|
|
|
//go:build !linux || (linux && (386 || loong64 || arm || armbe))
|
|
|
|
package linuxfw
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"tailscale.com/types/logger"
|
|
)
|
|
|
|
// ErrUnsupported is the error returned from all functions on non-Linux
|
|
// platforms.
|
|
var ErrUnsupported = errors.New("linuxfw:unsupported")
|
|
|
|
// 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
|
|
}
|