mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #18774 from dgibson/bad-default-protocol
pasta: Correct handling of unknown protocols
This commit is contained in:
@ -48,7 +48,7 @@ func (r *Runtime) setupPasta(ctr *Container, netns string) error {
|
||||
cmdArgs = append(cmdArgs, "-t")
|
||||
case "udp":
|
||||
cmdArgs = append(cmdArgs, "-u")
|
||||
case "default":
|
||||
default:
|
||||
return fmt.Errorf("can't forward protocol: %s", protocol)
|
||||
}
|
||||
|
||||
|
@ -681,3 +681,11 @@ function teardown() {
|
||||
sleep 1
|
||||
! ps -p $(cat "${pidfile}") && rm "${pidfile}"
|
||||
}
|
||||
|
||||
### Options ####################################################################
|
||||
@test "podman networking with pasta(1) - Unsupported protocol in port forwarding" {
|
||||
local port=$(random_free_port "" "" tcp)
|
||||
|
||||
run_podman 126 run --net=pasta -p "${port}:${port}/sctp" $IMAGE true
|
||||
is "$output" "Error: .*can't forward protocol: sctp"
|
||||
}
|
||||
|
Reference in New Issue
Block a user