diff options
author | Minoru TAKAHASHI <takahashi.minoru7@gmail.com> | 2015-06-16 13:46:10 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-06-18 08:33:38 +0900 |
commit | 9251504f15aaaea4311e46be0d2d772aff54aa27 (patch) | |
tree | 4621d105a57c9838c57106612499675a1a586477 | |
parent | cd46e0685fc56844d18be484cdfc1f9e354eebe7 (diff) |
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 <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/app/ofctl_rest.py | 7 |
1 files 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) |