Skip to content
Snippets Groups Projects
Commit e5e55306 authored by Maximilian Wilhelm's avatar Maximilian Wilhelm
Browse files

Don't export routes learned via iBGP to an iBGP peer.

parent 934e4a2c
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