@@ -40,7 +40,7 @@ const (
40
40
// Prepend is the insert flag for iptable
41
41
Prepend RulePosition = "-I"
42
42
// Append is the append flag for iptable
43
- Append RulePosition = "-A"
43
+ Append RulePosition = "-A"
44
44
)
45
45
46
46
// Interface is an injectable interface for running iptables commands. Implementations must be goroutine-safe.
@@ -101,7 +101,7 @@ type Table string
101
101
102
102
const (
103
103
// TableNAT represents the built-in nat table
104
- TableNAT Table = "nat"
104
+ TableNAT Table = "nat"
105
105
// TableFilter represents the built-in filter table
106
106
TableFilter Table = "filter"
107
107
// TableMangle represents the built-in mangle table
@@ -115,13 +115,13 @@ const (
115
115
// ChainPostrouting used for source NAT in nat table
116
116
ChainPostrouting Chain = "POSTROUTING"
117
117
// ChainPrerouting used for DNAT (destination NAT) in nat table
118
- ChainPrerouting Chain = "PREROUTING"
118
+ ChainPrerouting Chain = "PREROUTING"
119
119
// ChainOutput used for the packets going out from local
120
- ChainOutput Chain = "OUTPUT"
120
+ ChainOutput Chain = "OUTPUT"
121
121
// ChainInput used for incoming packets
122
- ChainInput Chain = "INPUT"
122
+ ChainInput Chain = "INPUT"
123
123
// ChainForward used for the packets for another NIC
124
- ChainForward Chain = "FORWARD"
124
+ ChainForward Chain = "FORWARD"
125
125
)
126
126
127
127
const (
@@ -138,6 +138,7 @@ type RestoreCountersFlag bool
138
138
139
139
// RestoreCounters a boolean true constant for the option flag RestoreCountersFlag
140
140
const RestoreCounters RestoreCountersFlag = true
141
+
141
142
// NoRestoreCounters a boolean false constant for the option flag RestoreCountersFlag
142
143
const NoRestoreCounters RestoreCountersFlag = false
143
144
@@ -146,6 +147,7 @@ type FlushFlag bool
146
147
147
148
// FlushTables a boolean true constant for option flag FlushFlag
148
149
const FlushTables FlushFlag = true
150
+
149
151
// NoFlushTables a boolean false constant for option flag FlushFlag
150
152
const NoFlushTables FlushFlag = false
151
153
@@ -160,13 +162,16 @@ var RandomFullyMinVersion = utilversion.MustParseGeneric("1.6.2")
160
162
161
163
// WaitMinVersion a minimum iptables versions supporting the -w and -w<seconds> flags
162
164
var WaitMinVersion = utilversion .MustParseGeneric ("1.4.20" )
165
+
163
166
// WaitSecondsMinVersion a minimum iptables versions supporting the wait seconds
164
167
var WaitSecondsMinVersion = utilversion .MustParseGeneric ("1.4.22" )
168
+
165
169
// WaitRestoreMinVersion a minimum iptables versions supporting the wait restore seconds
166
170
var WaitRestoreMinVersion = utilversion .MustParseGeneric ("1.6.2" )
167
171
168
172
// WaitString a constant for specifying the wait flag
169
173
const WaitString = "-w"
174
+
170
175
// WaitSecondsValue a constant for specifying the default wait seconds
171
176
const WaitSecondsValue = "5"
172
177
0 commit comments