summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>2020-07-13 20:51:18 +0900
committerMatthew Heon <matthew.heon@pm.me>2020-07-22 14:15:30 -0400
commit9c8ffc4615d178bd21e18347128e10ca5ca5d7d8 (patch)
treeee13f7f0a84ea78200218256387cb2c97aa9d495 /pkg
parentc6852ee516abe3e1c4e5e31168d85d7cd446ce36 (diff)
downloadpodman-9c8ffc4615d178bd21e18347128e10ca5ca5d7d8.tar.gz
podman-9c8ffc4615d178bd21e18347128e10ca5ca5d7d8.tar.bz2
podman-9c8ffc4615d178bd21e18347128e10ca5ca5d7d8.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')
-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{}{}