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

If both ipv4 iptables fails and ipv6 tables fail, the failure reason is lost #711

Closed
joejulian opened this issue Mar 3, 2022 · 0 comments · Fixed by #712
Closed

If both ipv4 iptables fails and ipv6 tables fail, the failure reason is lost #711

joejulian opened this issue Mar 3, 2022 · 0 comments · Fixed by #712
Labels

Comments

@joejulian
Copy link
Contributor

if ip4t == nil && ip6t == nil {
return fmt.Errorf("neither iptables nor ip6tables usable")
}

If maybeGetIptables for both ipv4 and ipv6 returns nil, a generic error is returned that doesn't help the user diagnose the problem. If only one of them fails, it appears that a much more helpful error is generated.

if err := dnatChain.check(ip4t); err != nil {
return fmt.Errorf("could not check ipv4 dnat: %v", err)
}

Should those more helpful errors also be generated for the double failure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant