mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
bgp/bmp: bug fix. remove redundant construction of path attributes
BGPPathAttributeNextHop and BGPPathAttributeMpReachNLRI is already in new_pathattr. so stop construct and append it to new_pathattr list. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
b04e98faa7
commit
83c5c15cd3
@ -173,18 +173,8 @@ class BMPClient(Activity):
|
||||
new_pathattr.append(mpunreach_attr)
|
||||
else:
|
||||
if isinstance(path, Ipv4Path):
|
||||
nexthop_attr = BGPPathAttributeNextHop(path.nexthop)
|
||||
new_pathattr.append(nexthop_attr)
|
||||
return BGPUpdate(nlri=[path.nlri],
|
||||
path_attributes=new_pathattr)
|
||||
else:
|
||||
mpnlri_attr = BGPPathAttributeMpReachNLRI(
|
||||
path.route_family.afi,
|
||||
path.route_family.safi,
|
||||
path.nexthop,
|
||||
[path.nlri]
|
||||
)
|
||||
new_pathattr.append(mpnlri_attr)
|
||||
|
||||
return BGPUpdate(path_attributes=new_pathattr)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user