Skip to content
Open
Changes from all commits
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
7 changes: 7 additions & 0 deletions iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"strconv"
"strings"
"syscall"
"os"
)

// Adds the output of stderr to exec.ExitError
Expand Down Expand Up @@ -432,6 +433,12 @@ func (ipt *IPTables) runWithOutput(args []string, stdout io.Writer) error {
}

var stderr bytes.Buffer

//expand environment variables
for index, element := range args {
args[index] = os.ExpandEnv(element)
}

cmd := exec.Cmd{
Path: ipt.path,
Args: args,
Expand Down