Skip to content

Commit

Permalink
Merge pull request #153 from jbemmel/patch-1
Browse files Browse the repository at this point in the history
Fix bug where path.source is set to VRF_TABLE (in vrf.py)
  • Loading branch information
anarkiwi committed Sep 9, 2021
2 parents 2e70346 + eead1ac commit 0307a4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ryu/services/protocols/bgp/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from ryu.lib.packet.bgp import BGP_ATTR_ORIGIN_EGP
from ryu.lib.packet.bgp import BGP_ATTR_ORIGIN_INCOMPLETE

from ryu.services.protocols.bgp.constants import VRF_TABLE

LOG = logging.getLogger('bgpspeaker.processor')


Expand Down Expand Up @@ -428,7 +430,7 @@ def _cmp_by_asn(local_asn, path1, path2):
"""
def get_path_source_asn(path):
asn = None
if path.source is None:
if path.source is None or path.source == VRF_TABLE:
asn = local_asn
else:
asn = path.source.remote_as
Expand Down

0 comments on commit 0307a4e

Please sign in to comment.