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
|
|
|
// TODO(#8502): add support for more architectures
|
|
|
|
//go:build linux && (arm64 || amd64)
|
2022-08-24 04:00:06 +00:00
|
|
|
|
|
|
|
package linuxfw
|
|
|
|
|
|
|
|
import (
|
|
|
|
"tailscale.com/types/logger"
|
|
|
|
)
|
|
|
|
|
|
|
|
// DebugNetfilter prints debug information about iptables rules to the
|
|
|
|
// provided log function.
|
|
|
|
func DebugIptables(logf logger.Logf) error {
|
2023-07-21 03:36:12 +00:00
|
|
|
// unused.
|
2022-08-24 04:00:06 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// DetectIptables returns the number of iptables rules that are present in the
|
|
|
|
// system, ignoring the default "ACCEPT" rule present in the standard iptables
|
|
|
|
// chains.
|
|
|
|
//
|
|
|
|
// It only returns an error when the kernel returns an error (i.e. when a
|
|
|
|
// syscall fails); when there are no iptables rules, it is valid for this
|
|
|
|
// function to return 0, nil.
|
|
|
|
func DetectIptables() (int, error) {
|
2023-07-21 03:36:12 +00:00
|
|
|
panic("unused")
|
2022-08-24 04:00:06 +00:00
|
|
|
}
|