summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2014-07-02 18:17:28 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-07-03 00:09:23 +0900
commit972bce0234c706633857fb760801d7a86664488d (patch)
treea558cac51547707b5f67cd00878a7eeab382dcad
parentf96435bcfa57d45e01d22aa96f8567545e26f6e7 (diff)
ospf: fix bug in encoding
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/lib/packet/ospf.py2
1 files changed, 1 insertions, 1 deletions
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,