482bfd
From 6c97e0d5c140d587e5477d478159e91b8adcfd15 Mon Sep 17 00:00:00 2001
482bfd
From: Brent Baude <bbaude@redhat.com>
482bfd
Date: Thu, 27 Feb 2020 14:39:31 -0600
482bfd
Subject: [PATCH 2/2] network create should use firewall plugin
482bfd
482bfd
when creating a network, podman should add the firewall plugin to the config but not specify a backend.  this will allow cni to determine whether it should use an iptables|firewalld backend.
482bfd
482bfd
Signed-off-by: Brent Baude <bbaude@redhat.com>
482bfd
---
482bfd
 pkg/adapter/network.go     | 1 +
482bfd
 pkg/network/netconflist.go | 1 -
482bfd
 2 files changed, 1 insertion(+), 1 deletion(-)
482bfd
482bfd
diff --git a/pkg/network/netconflist.go b/pkg/network/netconflist.go
482bfd
index a8217097ac..34ff000249 100644
482bfd
--- a/pkg/network/netconflist.go
482bfd
+++ b/pkg/network/netconflist.go
482bfd
@@ -110,7 +110,6 @@ func NewPortMapPlugin() PortMapConfig {
482bfd
 func NewFirewallPlugin() FirewallConfig {
482bfd
 	return FirewallConfig{
482bfd
 		PluginType: "firewall",
482bfd
-		Backend:    "iptables",
482bfd
 	}
482bfd
 }
482bfd
 
482bfd
482bfd
From cfd40608907b653a8b05f2e4f4243f8aa677b6e3 Mon Sep 17 00:00:00 2001
482bfd
From: Brent Baude <bbaude@redhat.com>
482bfd
Date: Thu, 27 Feb 2020 14:35:48 -0600
482bfd
Subject: [PATCH 1/2] add firewall plugin (no backend) to default cni config
482bfd
482bfd
in order for the fall back mechanisms to work in containernetworking-plugins, the firewall plugin must still be called via the cni configuration file.  however, no backend w
482bfd
482bfd
Signed-off-by: Brent Baude <bbaude@redhat.com>
482bfd
---
482bfd
 cni/87-podman-bridge.conflist | 3 +++
482bfd
 1 file changed, 3 insertions(+)
482bfd
482bfd
diff -up a/cni/87-podman-bridge.conflist b/cni/87-podman-bridge.conflist
482bfd
--- a/cni/87-podman-bridge.conflist
482bfd
+++ b/cni/87-podman-bridge.conflist
482bfd
@@ -31,8 +31,7 @@
482bfd
             }
482bfd
 	},
482bfd
 	{
482bfd
-            "type": "firewall",
482bfd
-	    "backend": "iptables"
482bfd
+            "type": "firewall"
482bfd
 	}
482bfd
     ]
482bfd
 }