mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fixed IPv6 iptables rules for enabled firewalld
Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
This commit is contained in:
parent
44e9db7e85
commit
a6d7b43dfc
1 changed files with 7 additions and 1 deletions
|
@ -512,8 +512,14 @@ func filterOutput(start time.Time, output []byte, args ...string) []byte {
|
|||
// Raw calls 'iptables' system command, passing supplied arguments.
|
||||
func (iptable IPTable) Raw(args ...string) ([]byte, error) {
|
||||
if firewalldRunning {
|
||||
// select correct IP version for firewalld
|
||||
ipv := Iptables
|
||||
if iptable.Version == IPv6 {
|
||||
ipv = IP6Tables
|
||||
}
|
||||
|
||||
startTime := time.Now()
|
||||
output, err := Passthrough(Iptables, args...)
|
||||
output, err := Passthrough(ipv, args...)
|
||||
if err == nil || !strings.Contains(err.Error(), "was not provided by any .service files") {
|
||||
return filterOutput(startTime, output, args...), err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue