diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2014-05-06 05:14:22 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-05-10 01:14:56 +0900 |
commit | c560908633d03ec640518604c2f978591d1ab878 (patch) | |
tree | a0b19a738801b5873c0a008d4a02bf6b32a065fd | |
parent | 7c1410ccf607957a8b4a5ad62e8fbeea2d29872a (diff) |
packet/bgp: fix bug in serializing AS PATH path attribute
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/bgp.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index 06323a85..e488653d 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -1265,6 +1265,8 @@ class _BGPPathAttributeAsPathCommon(_PathAttribute): type_ = self._AS_SEQUENCE l = list(e) num_as = len(l) + if num_as == 0: + continue msg_pack_into(self._SEG_HDR_PACK_STR, buf, offset, type_, num_as) offset += struct.calcsize(self._SEG_HDR_PACK_STR) for i in l: |