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>
This commit is contained in:
committed by
FUJITA Tomonori
parent
cd46e0685f
commit
9251504f15
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user