summaryrefslogtreecommitdiff
path: root/lib/bundle.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2015-07-29 08:36:07 -0700
committerBen Pfaff <blp@nicira.com>2015-07-29 08:36:07 -0700
commit13d2c6894ec9dc9b70c109bd9c4dcc6610782821 (patch)
tree8c46bb1d1e9acb1cb09e3c82264bb694dc5b463e /lib/bundle.c
parentd26eda9fe399b28b6760e29f14f2500d80319283 (diff)
downloadopenvswitch-13d2c6894ec9dc9b70c109bd9c4dcc6610782821.tar.gz
ofp-actions: OFPP_ANY (aka OFPP_NONE) is not a valid output port.
This is implied by the list of ports that are valid for output in the various versions of the OpenFlow specification. Found by OFTest. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Flavio Leitner <fbl@sysclose.org>
Diffstat (limited to 'lib/bundle.c')
-rw-r--r--lib/bundle.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundle.c b/lib/bundle.c
index f1b1478e5..baf6bbf97 100644
--- a/lib/bundle.c
+++ b/lib/bundle.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2012, 2013, 2014 Nicira, Inc.
+/* Copyright (c) 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -117,14 +117,14 @@ bundle_check(const struct ofpact_bundle *bundle, ofp_port_t max_ports,
for (i = 0; i < bundle->n_slaves; i++) {
ofp_port_t ofp_port = bundle->slaves[i];
- enum ofperr error;
- error = ofpact_check_output_port(ofp_port, max_ports);
- if (error) {
- VLOG_WARN_RL(&rl, "invalid slave %"PRIu16, ofp_port);
- return error;
+ if (ofp_port != OFPP_NONE) {
+ enum ofperr error = ofpact_check_output_port(ofp_port, max_ports);
+ if (error) {
+ VLOG_WARN_RL(&rl, "invalid slave %"PRIu16, ofp_port);
+ return error;
+ }
}
-
/* Controller slaves are unsupported due to the lack of a max_len
* argument. This may or may not change in the future. There doesn't
* seem to be a real-world use-case for supporting it. */