@@ -90,18 +90,17 @@ func (s *ProxyServer) platformCheckSupported(ctx context.Context) (ipv4Supported
90
90
91
91
if isIPTablesBased (s .Config .Mode ) {
92
92
// 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 ()
95
94
96
95
ipv4Supported = ipts [v1 .IPv4Protocol ] != nil
97
96
ipv6Supported = ipts [v1 .IPv6Protocol ] != nil
98
97
99
98
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 )
101
100
} 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 )
103
102
} 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 )
105
104
}
106
105
} else {
107
106
// The nft CLI always supports both families.
0 commit comments