From 9251504f15aaaea4311e46be0d2d772aff54aa27 Mon Sep 17 00:00:00 2001 From: Minoru TAKAHASHI Date: Tue, 16 Jun 2015 13:46:10 +0900 Subject: ofctl_rest: fix error of delete_flow_entry ofctl_rest caused an exception when run delete_flow_entry command in OpenFlow1.0. this patch fixes this problem. Signed-off-by: Minoru TAKAHASHI Signed-off-by: FUJITA Tomonori --- ryu/app/ofctl_rest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py index a3644017..fe0bf24f 100644 --- a/ryu/app/ofctl_rest.py +++ b/ryu/app/ofctl_rest.py @@ -519,10 +519,13 @@ class StatsController(ControllerBase): if dp is None: return Response(status=404) - flow = {'table_id': dp.ofproto.OFPTT_ALL} - _ofp_version = dp.ofproto.OFP_VERSION + if ofproto_v1_0.OFP_VERSION == _ofp_version: + flow = {} + else: + flow = {'table_id': dp.ofproto.OFPTT_ALL} + _ofctl = supported_ofctl.get(_ofp_version, None) if _ofctl is not None: _ofctl.mod_flow_entry(dp, flow, dp.ofproto.OFPFC_DELETE) -- cgit v1.2.3