Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjfree committed Apr 29, 2024
1 parent 8a4b56a commit 6122933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/route_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func iptablesEnsureRule(table, chain string, rule ...string) error {
for {
if _, err := RunCmd("iptables", cmd...); err != nil {
// if something went wrong with the command
if !strings.Contains(err.Error(), "Bad rule") {
if !(strings.Contains(err.Error(), "Bad rule") || strings.Contains(err.Error(), "No ")) {
return err
}
// change to add
Expand All @@ -78,7 +78,7 @@ func iptablesEnsureChain(table, chain string) error {
for {
if _, err := RunCmd("iptables", cmd...); err != nil {
// if something went wrong with the command
if !strings.Contains(err.Error(), chain) {
if !(strings.Contains(err.Error(), chain) || strings.Contains(err.Error(), "No ")) {
return err
}
// change to add
Expand Down

0 comments on commit 6122933

Please sign in to comment.