Skip to content

Commit bfa170e

Browse files
fix: Prevent iptable list cmd to do reverse dns lookup (#2682)
fix: While listing iptable rules added -n option to prevent reverse dns lookup
1 parent 90909a2 commit bfa170e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iptables/iptables.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (c *Client) RunCmd(version, params string) error {
118118

119119
// check if iptable chain alreay exists
120120
func (c *Client) ChainExists(version, tableName, chainName string) bool {
121-
params := fmt.Sprintf("-t %s -L %s", tableName, chainName)
121+
params := fmt.Sprintf("-t %s -nL %s", tableName, chainName)
122122
if err := c.RunCmd(version, params); err != nil {
123123
return false
124124
}

0 commit comments

Comments
 (0)