aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>2013-10-24 11:58:53 +0900
committerBen Pfaff <blp@nicira.com>2013-10-23 21:25:33 -0700
commitb9b0087274759ea3aaa55fc489c2265db0445b82 (patch)
tree7084f6b4a910228800eea431ec96c342e4243360
parentb0b906ccf485f8342e7be4f976f14d2a235e0a69 (diff)
connmgr: Fix an abort.
Fix a problem introduced by commit cfa955b083c5617212a29a03423e063ff6cb350a. (connmgr: Fix packet-in reason for OpenFlow1.3 table-miss flow entries.). ofconn might not be connected here, in that case ofputil_protocol_to_ofp_version aborts. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--ofproto/connmgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c
index 3c2b6cc4..c9feae52 100644
--- a/ofproto/connmgr.c
+++ b/ofproto/connmgr.c
@@ -1496,9 +1496,9 @@ wire_reason(struct ofconn *ofconn, const struct ofproto_packet_in *pin)
{
if (pin->generated_by_table_miss && pin->up.reason == OFPR_ACTION) {
enum ofputil_protocol protocol = ofconn_get_protocol(ofconn);
- enum ofp_version version = ofputil_protocol_to_ofp_version(protocol);
- if (version >= OFP13_VERSION) {
+ if (protocol != OFPUTIL_P_NONE
+ && ofputil_protocol_to_ofp_version(protocol) >= OFP13_VERSION) {
return OFPR_NO_MATCH;
}
}