Skip to content

Commit

Permalink
Merge pull request #466 from Luap99/port-error
Browse files Browse the repository at this point in the history
port/builtin: return proper error for sctp
  • Loading branch information
AkihiroSuda authored Sep 18, 2024
2 parents 264f23e + f11b0e6 commit 24fc6d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/port/builtin/parent/parent.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ func (d *driver) AddPort(ctx context.Context, spec port.Spec) (*port.Status, err
case "udp", "udp4", "udp6":
err = udp.Run(d.socketPath, spec, routineStopCh, routineStoppedCh, d.logWriter)
default:
// NOTREACHED
return nil, errors.New("spec was not validated?")
return nil, fmt.Errorf("unsupported port protocol %s", spec.Proto)
}
if err != nil {
if isEPERM(err) {
Expand Down

0 comments on commit 24fc6d2

Please sign in to comment.