Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added -n option in iptables list cmd to prevent reverse dns lookup #2686

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func RunCmd(version, params string) error {

// check if iptable chain alreay exists
func ChainExists(version, tableName, chainName string) bool {
params := fmt.Sprintf("-t %s -L %s", tableName, chainName)
params := fmt.Sprintf("-t %s -nL %s", tableName, chainName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth documenting these flags here? I know that you can look them up from the manpage, but it might be helpful to put it in front of readers' faces.

Copy link
Member Author

@tamilmani1989 tamilmani1989 Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for suggestion. This is cherry-pick PR for backport release. will add it next time in the PR created against master

if err := RunCmd(version, params); err != nil {
return false
}
Expand Down
Loading