Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 ryu/ofproto/ofproto_v1_0_parser.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
b/ryu/ofproto/ofproto_v1_0_parser.py
index 3fae86d..e1951c8 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -18,6 +18,7 @@ import struct
 import binascii
 
 from ofproto_parser import StringifyMixin, MsgBase, msg_pack_into, msg_str_attr
+from ryu.lib import addrconv
 from ryu.lib import mac
 from . import ofproto_parser
 from . import ofproto_v1_0
@@ -86,6 +87,9 @@ class OFPPhyPort(ofproto_parser.namedtuple('OFPPhyPort', (
     def parser(cls, buf, offset):
         port = struct.unpack_from(ofproto_v1_0.OFP_PHY_PORT_PACK_STR,
                                   buf, offset)
+        i = cls._fields.index('hw_addr')
+        port = list(port)
+        port[i] = addrconv.mac.bin_to_text(port[i])
         return cls(*port)
 
 
@@ -2109,7 +2113,7 @@ class OFPPortMod(MsgBase):
     def _serialize_body(self):
         msg_pack_into(ofproto_v1_0.OFP_PORT_MOD_PACK_STR,
                       self.buf, ofproto_v1_0.OFP_HEADER_SIZE,
-                      self.port_no, self.hw_addr,
+                      self.port_no, addrconv.mac.text_to_bin(self.hw_addr),
                       self.config, self.mask, self.advertise)
 
 
-- 
1.8.3.1


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to