Currently, clear flow entries command (/stats/flowentry/clear/<dpid>) in ofctl_rest deletes flow entries from only table 0. This patch fixes the command to delete flow entries from all tables.
Signed-off-by: IWASE Yusuke <[email protected]> --- ryu/app/ofctl_rest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py index 270f733..5a2290d 100644 --- a/ryu/app/ofctl_rest.py +++ b/ryu/app/ofctl_rest.py @@ -367,12 +367,14 @@ class StatsController(ControllerBase): if dp is None: return Response(status=404) + flow = {'table_id': dp.ofproto.OFPTT_ALL} + if dp.ofproto.OFP_VERSION == ofproto_v1_0.OFP_VERSION: ofctl_v1_0.delete_flow_entry(dp) elif dp.ofproto.OFP_VERSION == ofproto_v1_2.OFP_VERSION: - ofctl_v1_2.mod_flow_entry(dp, {}, dp.ofproto.OFPFC_DELETE) + ofctl_v1_2.mod_flow_entry(dp, flow, dp.ofproto.OFPFC_DELETE) elif dp.ofproto.OFP_VERSION == ofproto_v1_3.OFP_VERSION: - ofctl_v1_3.mod_flow_entry(dp, {}, dp.ofproto.OFPFC_DELETE) + ofctl_v1_3.mod_flow_entry(dp, flow, dp.ofproto.OFPFC_DELETE) else: LOG.debug('Unsupported OF protocol') return Response(status=501) -- 1.9.1 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
