@@ -90,18 +90,17 @@ func (s *ProxyServer) platformCheckSupported(ctx context.Context) (ipv4Supported
9090
9191 if isIPTablesBased (s .Config .Mode ) {
9292 // Check for the iptables and ip6tables binaries.
93- var ipts map [v1.IPFamily ]utiliptables.Interface
94- ipts , err = utiliptables .NewDualStack ()
93+ ipts , errDS := utiliptables .NewDualStack ()
9594
9695 ipv4Supported = ipts [v1 .IPv4Protocol ] != nil
9796 ipv6Supported = ipts [v1 .IPv6Protocol ] != nil
9897
9998 if ! ipv4Supported && ! ipv6Supported {
100- err = fmt .Errorf ("iptables is not available on this host : %w" , err )
99+ err = fmt .Errorf ("iptables is not available on this host : %w" , errDS )
101100 } else if ! ipv4Supported {
102- logger .Info ("No iptables support for family" , "ipFamily" , v1 .IPv4Protocol , "error" , err )
101+ logger .Info ("No iptables support for family" , "ipFamily" , v1 .IPv4Protocol , "error" , errDS )
103102 } else if ! ipv6Supported {
104- logger .Info ("No iptables support for family" , "ipFamily" , v1 .IPv6Protocol , "error" , err )
103+ logger .Info ("No iptables support for family" , "ipFamily" , v1 .IPv6Protocol , "error" , errDS )
105104 }
106105 } else {
107106 // The nft CLI always supports both families.
0 commit comments