Merge pull request #2658 from mheon/sctp

Add support for SCTP port forwarding
This commit is contained in:
OpenShift Merge Robot
2019-03-16 04:03:31 -07:00
committed by GitHub

View File

@ -183,6 +183,7 @@ func waitPidsStop(pids []int, timeout time.Duration) error {
func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
var files []*os.File
notifySCTP := false
for _, i := range ports {
switch i.Protocol {
case "udp":
@ -218,6 +219,12 @@ func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
}
files = append(files, f)
break
case "sctp":
if !notifySCTP {
notifySCTP = true
logrus.Warnf("port reservation for SCTP is not supported")
}
break
default:
return nil, fmt.Errorf("unknown protocol %s", i.Protocol)