summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/app/ofctl_rest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py
index 8ab53f98..e108b036 100644
--- a/ryu/app/ofctl_rest.py
+++ b/ryu/app/ofctl_rest.py
@@ -256,6 +256,11 @@ class StatsController(ControllerBase):
if dp is None:
return Response(status=404)
+ if dp.ofproto.OFP_VERSION == ofproto_v1_0.OFP_VERSION or \
+ dp.ofproto.OFP_VERSION == ofproto_v1_2.OFP_VERSION:
+ LOG.debug('Unsupported OF protocol')
+ return Response(status=501)
+
if cmd == 'add':
cmd = dp.ofproto.OFPMC_ADD
elif cmd == 'modify':