diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-07-06 15:12:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-11 16:45:31 +0900 |
commit | a6c5f27cbe409bab539d6155a035839122fb7bce (patch) | |
tree | c435cfe0b9d53af7c59afdca34fe2b6fa914a9bd | |
parent | 04b4bbbe01a6149354c178f7db427736e50f8717 (diff) |
BGPSpeaker: Fix capability check when MP-BGP not supported
Currently, BGPSpeaker skips sending the Update messages with an
IPv4/IPv6 prefix when the peer does not support MP-BGP.
This patch fixes capability check in order to send IP prefix when
MP-BGP not suppored by the peer.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/bgp/peer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ryu/services/protocols/bgp/peer.py b/ryu/services/protocols/bgp/peer.py index 53582b3a..50c280b3 100644 --- a/ryu/services/protocols/bgp/peer.py +++ b/ryu/services/protocols/bgp/peer.py @@ -48,6 +48,7 @@ from ryu.lib.packet import bgp from ryu.lib.packet.bgp import RouteFamily from ryu.lib.packet.bgp import RF_IPv4_UC +from ryu.lib.packet.bgp import RF_IPv6_UC from ryu.lib.packet.bgp import RF_IPv4_VPN from ryu.lib.packet.bgp import RF_IPv6_VPN from ryu.lib.packet.bgp import RF_RTC_UC @@ -1873,7 +1874,8 @@ class Peer(Source, Sink, NeighborConfListener, Activity): # Check if this session is available for given paths afi/safi path_rf = path.route_family - if not self.is_mpbgp_cap_valid(path_rf): + if not (self.is_mpbgp_cap_valid(path_rf) or + path_rf in [RF_IPv4_UC, RF_IPv6_UC]): LOG.debug('Skipping sending path as %s route family is not' ' available for this session', path_rf) return |