summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2015-12-22 11:49:18 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-12-22 13:50:27 +0900
commited6adb6d836e84a9eb305f81f492535480202c33 (patch)
tree6d1fcc770f1625ba016d615c51ac8f14fa9f314e
parent366044d724f1d639a156cfa6058f632ab1b26a5a (diff)
lib/ofctl: Confirm UTF-8 in binary fields
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/lib/ofctl_v1_0.py4
-rw-r--r--ryu/lib/ofctl_v1_2.py4
-rw-r--r--ryu/lib/ofctl_v1_3.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/ryu/lib/ofctl_v1_0.py b/ryu/lib/ofctl_v1_0.py
index dc2459d3..c66b4109 100644
--- a/ryu/lib/ofctl_v1_0.py
+++ b/ryu/lib/ofctl_v1_0.py
@@ -421,7 +421,7 @@ def get_table_stats(dp, waiters):
if (1 << k) & stat.wildcards:
wildcards.append(v)
s = {'table_id': stat.table_id,
- 'name': stat.name,
+ 'name': stat.name.decode('utf-8'),
'wildcards': wildcards,
'max_entries': stat.max_entries,
'active_count': stat.active_count,
@@ -473,7 +473,7 @@ def get_port_desc(dp, waiters):
for stat in stats.values():
d = {'port_no': stat.port_no,
'hw_addr': stat.hw_addr,
- 'name': stat.name,
+ 'name': stat.name.decode('utf-8'),
'config': stat.config,
'state': stat.state,
'curr': stat.curr,
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py
index dcac557a..05a77adf 100644
--- a/ryu/lib/ofctl_v1_2.py
+++ b/ryu/lib/ofctl_v1_2.py
@@ -657,7 +657,7 @@ def get_table_stats(dp, waiters):
if (1 << k) & stat.config:
config.append(v)
s = {'table_id': stat.table_id,
- 'name': stat.name,
+ 'name': stat.name.decode('utf-8'),
'match': match,
'wildcards': wildcards,
'write_actions': write_actions,
@@ -835,7 +835,7 @@ def get_port_desc(dp, waiters):
for stat in stats.values():
d = {'port_no': stat.port_no,
'hw_addr': stat.hw_addr,
- 'name': stat.name,
+ 'name': stat.name.decode('utf-8'),
'config': stat.config,
'state': stat.state,
'curr': stat.curr,
diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py
index 94a3a338..9043b5b2 100644
--- a/ryu/lib/ofctl_v1_3.py
+++ b/ryu/lib/ofctl_v1_3.py
@@ -686,7 +686,7 @@ def get_table_features(dp, waiters):
pass
properties.append(p)
s = {'table_id': stat.table_id,
- 'name': stat.name,
+ 'name': stat.name.decode('utf-8'),
'metadata_match': stat.metadata_match,
'metadata_write': stat.metadata_write,
'config': stat.config,
@@ -965,7 +965,7 @@ def get_port_desc(dp, waiters):
for stat in stats:
d = {'port_no': stat.port_no,
'hw_addr': stat.hw_addr,
- 'name': stat.name,
+ 'name': stat.name.decode('utf-8'),
'config': stat.config,
'state': stat.state,
'curr': stat.curr,