Skip to content

Commit bc7912d

Browse files
authored
Merge pull request #37 from digitalocean/nshrader/update-max-port
ovs: update max openflow port past 1.0 standards
2 parents 80c06a4 + 1a207be commit bc7912d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ovs/action.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@ type resubmitPortAction struct {
404404

405405
// MarshalText implements Action.
406406
func (a *resubmitPortAction) MarshalText() ([]byte, error) {
407-
// Largest valid port ID is 0xfeff per openflow spec.
408-
if a.port < 0 || a.port > 0xfeff {
407+
// Largest valid port ID is 0xfffffeff per openflow spec.
408+
if a.port < 0 || a.port > 0xfffffeff {
409409
return nil, errResubmitPortInvalid
410410
}
411411

ovs/action_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,13 @@ func TestActionResubmitPort(t *testing.T) {
397397
action: "resubmit:1",
398398
},
399399
{
400-
desc: "max port (0xfeff)",
401-
port: 0xfeff,
402-
action: "resubmit:65279",
400+
desc: "max port (0xfffffeff)",
401+
port: 0xfffffeff,
402+
action: "resubmit:4294967039",
403403
},
404404
{
405-
desc: "max port+1 (0xfeff)",
406-
port: 0xff00,
405+
desc: "max port+1 (0xfffffeff)",
406+
port: 0xffffff00,
407407
err: errResubmitPortInvalid,
408408
},
409409
}

0 commit comments

Comments
 (0)