Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/ofproto/ofproto_v1_2_parser.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py
b/ryu/ofproto/ofproto_v1_2_parser.py
index e6dc5c6..94e8e2e 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -17,6 +17,7 @@
import struct
import itertools
+from ryu.lib import addrconv
from ryu.lib import mac
from ryu import utils
from ofproto_parser import StringifyMixin, MsgBase, msg_pack_into, msg_str_attr
@@ -175,6 +176,9 @@ class OFPPort(ofproto_parser.namedtuple('OFPPort', (
@classmethod
def parser(cls, buf, offset):
port = struct.unpack_from(ofproto_v1_2.OFP_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)
@@ -997,7 +1001,8 @@ class OFPPortMod(MsgBase):
def _serialize_body(self):
msg_pack_into(ofproto_v1_2.OFP_PORT_MOD_PACK_STR, self.buf,
ofproto_v1_2.OFP_HEADER_SIZE,
- self.port_no, self.hw_addr, self.config,
+ 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel