github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/controller/internal/supervisor/iptablesctrl/ipv6_nonwindows.go (about) 1 // +build !windows 2 3 package iptablesctrl 4 5 import ( 6 provider "go.aporeto.io/enforcerd/trireme-lib/controller/pkg/aclprovider" 7 ) 8 9 // GetIPv6Impl creates the instance of ipv6 struct which implements 10 // the interface ipImpl 11 func GetIPv6Impl(ipv6Enabled bool) (IPImpl, error) { 12 ipt, err := provider.NewGoIPTablesProviderV6([]string{"mangle"}, CustomQOSChain) 13 if err == nil { 14 // test if the system supports ip6tables 15 if _, err = ipt.ListChains("mangle"); err == nil { 16 return &ipv6{ipt: ipt, ipv6Enabled: ipv6Enabled}, nil 17 } 18 } 19 20 return &ipv6{ipt: nil, ipv6Enabled: false}, nil 21 }