mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
Merge pull request #2658 from mheon/sctp
Add support for SCTP port forwarding
This commit is contained in:
@ -183,6 +183,7 @@ func waitPidsStop(pids []int, timeout time.Duration) error {
|
|||||||
|
|
||||||
func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
|
func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
|
||||||
var files []*os.File
|
var files []*os.File
|
||||||
|
notifySCTP := false
|
||||||
for _, i := range ports {
|
for _, i := range ports {
|
||||||
switch i.Protocol {
|
switch i.Protocol {
|
||||||
case "udp":
|
case "udp":
|
||||||
@ -218,6 +219,12 @@ func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
|
|||||||
}
|
}
|
||||||
files = append(files, f)
|
files = append(files, f)
|
||||||
break
|
break
|
||||||
|
case "sctp":
|
||||||
|
if !notifySCTP {
|
||||||
|
notifySCTP = true
|
||||||
|
logrus.Warnf("port reservation for SCTP is not supported")
|
||||||
|
}
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unknown protocol %s", i.Protocol)
|
return nil, fmt.Errorf("unknown protocol %s", i.Protocol)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user