diff options
-rw-r--r-- | ryu/services/protocols/bgp/peer.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ryu/services/protocols/bgp/peer.py b/ryu/services/protocols/bgp/peer.py index eac098c0..48806bcb 100644 --- a/ryu/services/protocols/bgp/peer.py +++ b/ryu/services/protocols/bgp/peer.py @@ -75,6 +75,7 @@ from ryu.lib.packet.bgp import BGPPathAttributeExtendedCommunities from ryu.lib.packet.bgp import BGPPathAttributeMpReachNLRI from ryu.lib.packet.bgp import BGPPathAttributeMpUnreachNLRI from ryu.lib.packet.bgp import BGPPathAttributeCommunities +from ryu.lib.packet.bgp import BGPPathAttributeMultiExitDisc from ryu.lib.packet.bgp import BGP_ATTR_TYPE_ORIGIN from ryu.lib.packet.bgp import BGP_ATTR_TYPE_AS_PATH @@ -940,12 +941,15 @@ class Peer(Source, Sink, NeighborConfListener, Activity): # For eBGP session we can send multi-exit-disc if configured. multi_exit_disc = None if self.is_ebgp_peer(): - multi_exit_disc = pathattr_map.get( - BGP_ATTR_TYPE_MULTI_EXIT_DISC) - if not multi_exit_disc and self._neigh_conf.multi_exit_disc: + if self._neigh_conf.multi_exit_disc: multi_exit_disc = BGPPathAttributeMultiExitDisc( self._neigh_conf.multi_exit_disc ) + else: + pass + if not self.is_ebgp_peer(): + multi_exit_disc = pathattr_map.get( + BGP_ATTR_TYPE_MULTI_EXIT_DISC) # LOCAL_PREF Attribute. if not self.is_ebgp_peer(): |