summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/spec/createconfig.go5
-rw-r--r--test/e2e/port_test.go1
2 files changed, 1 insertions, 5 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 6a7ddc1ae..41030bf26 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -492,10 +492,7 @@ func (c *CreateConfig) CreatePortBindings() ([]ocicni.PortMapping, error) {
}
pm.HostPort = int32(hostPort)
- // CNI requires us to make both udp and tcp structs
- pm.Protocol = "udp"
- portBindings = append(portBindings, pm)
- pm.Protocol = "tcp"
+ pm.Protocol = containerPb.Proto()
portBindings = append(portBindings, pm)
}
}
diff --git a/test/e2e/port_test.go b/test/e2e/port_test.go
index 10698f376..ed15b54ac 100644
--- a/test/e2e/port_test.go
+++ b/test/e2e/port_test.go
@@ -54,7 +54,6 @@ var _ = Describe("Podman port", func() {
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
port := strings.Split(result.OutputToStringArray()[0], ":")[1]
- Expect(result.LineInOuputStartsWith(fmt.Sprintf("80/udp -> 0.0.0.0:%s", port))).To(BeTrue())
Expect(result.LineInOuputStartsWith(fmt.Sprintf("80/tcp -> 0.0.0.0:%s", port))).To(BeTrue())
})