Skip to content

Commit

Permalink
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions templates/peer.tmpl
Original file line number Diff line number Diff line change
@@ -59,13 +59,17 @@ protocol bgp AS{{ $peer.Asn }}v{{ $af }}_{{ $i }} {
};
export filter {
{{- $peer.PreExport }}
{{- if eq $peer.ExportPolicy "any" }}
if ((ASN,0,100) ~ bgp_large_community) then accept; # Originated
{{- if eq $peer.ExportPolicy "any" -}}
{{ if $global.Prefixes }}
accept_local(); # Originated
{{- end }}
if ((ASN,0,101) ~ bgp_large_community) then accept; # Upstream
if ((ASN,0,102) ~ bgp_large_community) then accept; # Peer
if ((ASN,0,103) ~ bgp_large_community) then accept; # Downstream
{{- else if eq $peer.ExportPolicy "cone" }}
if ((ASN,0,100) ~ bgp_large_community) then accept; # Originated
{{- else if eq $peer.ExportPolicy "cone" -}}
{{ if $global.Prefixes }}
accept_local(); # Originated
{{- end }}
if ((ASN,0,103) ~ bgp_large_community) then accept; # Downstream
{{- end }}
reject;

0 comments on commit 8b40deb

Please sign in to comment.