ofctl_rest caused an exception when run delete_flow_entry command in 
OpenFlow1.0.
this patch fixes this problem.

Signed-off-by: Minoru TAKAHASHI <[email protected]>
---
 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 a364401..fe0bf24 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)
-- 
1.9.1

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to