mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
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>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
"bridge": "cni-podman0",
|
||||
"isGateway": true,
|
||||
"ipMasq": true,
|
||||
"hairpinMode": true,
|
||||
"ipam": {
|
||||
"type": "host-local",
|
||||
"routes": [{ "dst": "0.0.0.0/0" }],
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user