Hi Albert,

diff --git a/ryu/services/protocols/bgp/peer.py 
b/ryu/services/protocols/bgp/peer.py
index 8bf96d6..d380e30 100644
--- a/ryu/services/protocols/bgp/peer.py
+++ b/ryu/services/protocols/bgp/peer.py
@@ -1622,7 +1622,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
 
         aspath = umsg_pattrs.get(BGP_ATTR_TYPE_AS_PATH)
         # Check if AS_PATH has loops.
-        if aspath.has_local_as(self.local_as):
+        if aspath.has_local_as(self.local_as, 
max_count=self._common_conf.allow_local_as_in_count):
             LOG.error('Update message AS_PATH has loops. Ignoring this'
                       ' UPDATE. %s', update_msg)
             return

The above seems to exceed the max line characters (>80).
I haven't investigated why pep8 does not complain it, though...


Other changes looks good to me!


Thanks,
Iwase


On 2017年02月06日 23:07, Albert Siersema wrote:
> Cisco/Juniper/Cumulus and undoubtedly more vendors offer a
> simplification of the EVPN configuration by not having to
> specify individual RD/RT's, e.g. in Cisco NX-OS syntax:
> 
> evpn
>    vni 10311 l2
>      rd auto
>      route-target import auto
>      route-target export auto
> 
> This simplifies/unifies the configuration.
> All leaf switches/ryu instances share the same ASN (e.g. 65511).
> Spine switches in the same layer can share an ASN as well (e.g. 65510).
> 
> To facilitate the above, the local ASN has to be accepted in the AS path.
> To this end, Cisco includes an 'allowas-in' configuration statement.
> See: 
> http://www.cisco.com/c/en/us/products/collateral/switches/nexus-9000-series-switches/guide-c07-734107.html
> search for "MP-eBGP Design with VTEP Leaf Nodes in the Same BGP Autonomous 
> System"
> 
> This patch offers the possibility to specify the number of accepted 
> occurrences
> of the local ASN in incoming AS paths. The default value is 0, which basically
> is the same as the code before this patch: local ASN in the path indicates a 
> loop.
> Non-zero values allow the local ASN to appear the specified number of times in
> the AS path. A maximum value of 3 should satisfy most deployments.
> 
> Signed-off-by: Albert Siersema <[email protected]>
> ---
>  ryu/lib/packet/bgp.py                       |  9 ++++-----
>  ryu/services/protocols/bgp/bgpspeaker.py    | 12 +++++++++++-
>  ryu/services/protocols/bgp/peer.py          |  4 ++--
>  ryu/services/protocols/bgp/rtconf/common.py | 26 +++++++++++++++++++++++++-
>  4 files changed, 42 insertions(+), 9 deletions(-)
> 
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to