summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/ports.go
diff options
context:
space:
mode:
authorAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>2020-07-13 20:51:18 +0900
committerAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>2020-07-15 14:30:32 +0900
commit758a700c114a9a30ac94981012071246f5a0e96b (patch)
tree2402629cbe6fb81670984c14abbe7383d520bd77 /pkg/specgen/generate/ports.go
parentc4843d4e9ce395f1bbcaae848e6172f5a4519a35 (diff)
downloadpodman-758a700c114a9a30ac94981012071246f5a0e96b.tar.gz
podman-758a700c114a9a30ac94981012071246f5a0e96b.tar.bz2
podman-758a700c114a9a30ac94981012071246f5a0e96b.zip
Fix "Error: unrecognized protocol \"TCP\" in port mapping"
"TCP" in upper characters was not recognized as a valid protocol name. Fix #6948 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Diffstat (limited to 'pkg/specgen/generate/ports.go')
-rw-r--r--pkg/specgen/generate/ports.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/specgen/generate/ports.go b/pkg/specgen/generate/ports.go
index 9412ecfbf..c8d1c27c5 100644
--- a/pkg/specgen/generate/ports.go
+++ b/pkg/specgen/generate/ports.go
@@ -356,6 +356,7 @@ func checkProtocol(protocol string, allowSCTP bool) ([]string, error) {
splitProto := strings.Split(protocol, ",")
// Don't error on duplicates - just deduplicate
for _, p := range splitProto {
+ p = strings.ToLower(p)
switch p {
case protoTCP, "":
protocols[protoTCP] = struct{}{}