Skip to content

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

@joejulian

Description

@joejulian

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions