util/linuxfw: move detection logic
Just a refactor to consolidate the firewall detection logic in a single package so that it can be reused in a later commit by containerboot. Updates #9310 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@ -103,8 +103,8 @@ func DebugNetfilter(logf logger.Logf) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DetectNetfilter returns the number of nftables rules present in the system.
|
||||
func DetectNetfilter() (int, error) {
|
||||
// detectNetfilter returns the number of nftables rules present in the system.
|
||||
func detectNetfilter() (int, error) {
|
||||
conn, err := nftables.New()
|
||||
if err != nil {
|
||||
return 0, FWModeNotSupportedError{
|
||||
|
Reference in New Issue
Block a user