summaryrefslogtreecommitdiff
path: root/pkg/network
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2020-05-11 13:57:19 -0400
committerMatthew Heon <mheon@redhat.com>2020-05-11 13:57:19 -0400
commit50487832c641028d87c2249ac77efdeb9907ebc3 (patch)
treea462d44325f0b6050c6dd9a3b73dbd3a0f21765c /pkg/network
parent7837bf3c071f1259bc08d8f9e52ed2b4edbda428 (diff)
downloadpodman-50487832c641028d87c2249ac77efdeb9907ebc3.tar.gz
podman-50487832c641028d87c2249ac77efdeb9907ebc3.tar.bz2
podman-50487832c641028d87c2249ac77efdeb9907ebc3.zip
Add HairpinMode to our CNI configs
This may resolve some issues with routing traffic between containers using the host's IP. Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'pkg/network')
-rw-r--r--pkg/network/netconflist.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/network/netconflist.go b/pkg/network/netconflist.go
index 34ff00024..4271d3f54 100644
--- a/pkg/network/netconflist.go
+++ b/pkg/network/netconflist.go
@@ -21,10 +21,11 @@ func NewNcList(name, version string) NcList {
// NewHostLocalBridge creates a new LocalBridge for host-local
func NewHostLocalBridge(name string, isGateWay, isDefaultGW, ipMasq bool, ipamConf IPAMHostLocalConf) *HostLocalBridge {
hostLocalBridge := HostLocalBridge{
- PluginType: "bridge",
- BrName: name,
- IPMasq: ipMasq,
- IPAM: ipamConf,
+ PluginType: "bridge",
+ BrName: name,
+ IPMasq: ipMasq,
+ HairpinMode: true,
+ IPAM: ipamConf,
}
if isGateWay {
hostLocalBridge.IsGW = true