|
@@ -109,6 +109,7 @@ func Timeout(timeout int) option {
|
|
// For backwards compatibility, by default always uses IPv4 and timeout 0.
|
|
// For backwards compatibility, by default always uses IPv4 and timeout 0.
|
|
// i.e. you can create an IPv6 IPTables using a timeout of 5 seconds passing
|
|
// i.e. you can create an IPv6 IPTables using a timeout of 5 seconds passing
|
|
// the IPFamily and Timeout options as follow:
|
|
// the IPFamily and Timeout options as follow:
|
|
|
|
+//
|
|
// ip6t := New(IPFamily(ProtocolIPv6), Timeout(5))
|
|
// ip6t := New(IPFamily(ProtocolIPv6), Timeout(5))
|
|
func New(opts ...option) (*IPTables, error) {
|
|
func New(opts ...option) (*IPTables, error) {
|
|
|
|
|
|
@@ -621,7 +622,7 @@ func iptablesHasWaitCommand(v1 int, v2 int, v3 int) bool {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
|
|
|
|
-//Checks if an iptablse version is after 1.6.0, when --wait support second
|
|
|
|
|
|
+// Checks if an iptablse version is after 1.6.0, when --wait support second
|
|
func iptablesWaitSupportSecond(v1 int, v2 int, v3 int) bool {
|
|
func iptablesWaitSupportSecond(v1 int, v2 int, v3 int) bool {
|
|
if v1 > 1 {
|
|
if v1 > 1 {
|
|
return true
|
|
return true
|