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 error on ip6tables not available #999

Merged
merged 3 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
linter
  • Loading branch information
pascal-fischer committed Jul 3, 2023
commit e6b8d962a28ddcc74e71d33aa0203ec8a99f7b4b
5 changes: 1 addition & 4 deletions client/firewall/iptables/manager_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ func Create(wgIface iFaceMapper) (*Manager, error) {

func isIptablesClientAvailable(client *iptables.IPTables) bool {
_, err := client.ListChains("filter")
if err == nil {
return true
}
return false
return err == nil
}

// AddFiltering rule to the firewall
Expand Down
5 changes: 1 addition & 4 deletions client/internal/routemanager/firewall_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ func NewFirewall(parentCTX context.Context) firewallManager {

func isIptablesClientAvailable(client *iptables.IPTables) bool {
_, err := client.ListChains("filter")
if err == nil {
return true
}
return false
return err == nil
}

func getInPair(pair routerPair) routerPair {
Expand Down