瀏覽代碼

Add wait flag to iptables

Fixes #1573
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Michael Crosby 11 年之前
父節點
當前提交
b315c380f4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/iptables/iptables.go

+ 1 - 1
pkg/iptables/iptables.go

@@ -150,7 +150,7 @@ func Raw(args ...string) ([]byte, error) {
 	if os.Getenv("DEBUG") != "" {
 		fmt.Printf("[DEBUG] [iptables]: %s, %v\n", path, args)
 	}
-	output, err := exec.Command(path, args...).CombinedOutput()
+	output, err := exec.Command(path, append([]string{"--wait"}, args...)...).CombinedOutput()
 	if err != nil {
 		return nil, fmt.Errorf("iptables failed: iptables %v: %s (%s)", strings.Join(args, " "), output, err)
 	}