From 972bce0234c706633857fb760801d7a86664488d Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Wed, 2 Jul 2014 18:17:28 +0900 Subject: ospf: fix bug in encoding Signed-off-by: ISHIDA Wataru Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/ospf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/lib/packet/ospf.py b/ryu/lib/packet/ospf.py index 368016d2..c2d33b96 100644 --- a/ryu/lib/packet/ospf.py +++ b/ryu/lib/packet/ospf.py @@ -166,7 +166,7 @@ class LSAHeader(StringifyMixin): id_ = addrconv.ipv4.text_to_bin(self.id_) else: id_ = (self.opaque_type << 24) + self.opaque_id - (id_,) = struct.unpack_from('4s', struct.pack('I', id_)) + (id_,) = struct.unpack_from('4s', struct.pack('!I', id_)) adv_router = addrconv.ipv4.text_to_bin(self.adv_router) return bytearray(struct.pack(self._HDR_PACK_STR, self.ls_age, -- cgit v1.2.3