diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2014-08-18 09:19:08 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-08-18 14:14:55 +0900 |
commit | f01af327c8f1316dbb5f7d647c0f58a029476f28 (patch) | |
tree | ca36b640c3c2167b36d7faf60fac4a0e92100a59 | |
parent | fc2b0b0f9c7d25ff41fe9f52086be5fe28bd7f3f (diff) |
bgp: use _class_suffixes to support various AddrPrefix
the AddrPrefix which variable 'nlri' has is not limited to
_BinAddrPrefix. this patch enables to encode to/decode from json dict
with various AddrPrefix in 'nlri'.
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index 0a96b42a..fb82412f 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -1958,7 +1958,7 @@ class BGPUnknownExtendedCommunity(_ExtendedCommunity): class BGPPathAttributeMpReachNLRI(_PathAttribute): _VALUE_PACK_STR = '!HBB' # afi, safi, next hop len _ATTR_FLAGS = BGP_ATTR_FLAG_OPTIONAL - _class_prefixes = ['_BinAddrPrefix'] + _class_suffixes = ['AddrPrefix'] _rd_length = 8 def __init__(self, afi, safi, next_hop, nlri, @@ -2056,7 +2056,7 @@ class BGPPathAttributeMpReachNLRI(_PathAttribute): class BGPPathAttributeMpUnreachNLRI(_PathAttribute): _VALUE_PACK_STR = '!HB' # afi, safi _ATTR_FLAGS = BGP_ATTR_FLAG_OPTIONAL - _class_prefixes = ['_BinAddrPrefix'] + _class_suffixes = ['AddrPrefix'] def __init__(self, afi, safi, withdrawn_routes, flags=0, type_=None, length=None): |