Use by default nftables on the linux systems (#922)

This commit is contained in:
Givi Khojanashvili 2023-06-01 19:51:13 +04:00 committed by GitHub
parent 3e9b46f8d8
commit 1939973c2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,11 +19,11 @@ func Create(iface iFaceMapper) (manager *DefaultManager, err error) {
return nil, err return nil, err
} }
} else { } else {
if fm, err = iptables.Create(iface.Name()); err != nil {
log.Debugf("failed to create iptables manager: %s", err)
// fallback to nftables
if fm, err = nftables.Create(iface.Name()); err != nil { if fm, err = nftables.Create(iface.Name()); err != nil {
log.Errorf("failed to create nftables manager: %s", err) log.Debugf("failed to create nftables manager: %s", err)
// fallback to iptables
if fm, err = iptables.Create(iface.Name()); err != nil {
log.Errorf("failed to create iptables manager: %s", err)
return nil, err return nil, err
} }
} }