mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Disable hostname lookup on chain exists check
Without `-n`, iptables will attempt to lookup hostnames for IP addresses, which can slow down the call dramatically. Since we don't need this, and generally don't even care about the output, use the `-n` flag to disable this. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
4daeb036fd
commit
1dcffbeb3f
1 changed files with 1 additions and 1 deletions
|
@ -456,7 +456,7 @@ func RawCombinedOutputNative(args ...string) error {
|
|||
|
||||
// ExistChain checks if a chain exists
|
||||
func ExistChain(chain string, table Table) bool {
|
||||
if _, err := Raw("-t", string(table), "-L", chain); err == nil {
|
||||
if _, err := Raw("-t", string(table), "-nL", chain); err == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
Loading…
Add table
Reference in a new issue