linuxfw_unsupported.go 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (c) Tailscale Inc & AUTHORS
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // NOTE: linux_{arm64, amd64} are the only two currently supported archs due to missing
  4. // support in upstream dependencies.
  5. // TODO(#8502): add support for more architectures
  6. //go:build linux && !(arm64 || amd64)
  7. package linuxfw
  8. import (
  9. "errors"
  10. "tailscale.com/types/logger"
  11. )
  12. // ErrUnsupported is the error returned from all functions on non-Linux
  13. // platforms.
  14. var ErrUnsupported = errors.New("linuxfw:unsupported")
  15. // DebugNetfilter is not supported on non-Linux platforms.
  16. func DebugNetfilter(logf logger.Logf) error {
  17. return ErrUnsupported
  18. }
  19. // DetectNetfilter is not supported on non-Linux platforms.
  20. func detectNetfilter() (int, error) {
  21. return 0, ErrUnsupported
  22. }
  23. // DebugIptables is not supported on non-Linux platforms.
  24. func debugIptables(logf logger.Logf) error {
  25. return ErrUnsupported
  26. }
  27. // DetectIptables is not supported on non-Linux platforms.
  28. func detectIptables() (int, error) {
  29. return 0, ErrUnsupported
  30. }