Skip to content
Snippets Groups Projects
Unverified Commit 631f24f8 authored by Serge Bazanski's avatar Serge Bazanski Committed by GitHub
Browse files

Merge pull request #57 from BarbarossaTM/feature/iBGP

iBGP fix-up
parents 4f475c0c e5e55306
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,11 @@ func (a *AdjRIBOut) AddPath(pfx bnet.Prefix, p *route.Path) error {
return nil
}
// Don't export routes learned via iBGP to an iBGP neighbor
if !p.BGPPath.EBGP && a.neighbor.IBGP {
return nil
}
p = p.Copy()
if !a.neighbor.IBGP && !a.neighbor.RouteServerClient {
p.BGPPath.ASPath = fmt.Sprintf("%d %s", a.neighbor.LocalASN, p.BGPPath.ASPath)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment