Skip to content

Commit

Permalink
fix: prefer-older-routes
Browse files Browse the repository at this point in the history
Closes: #186
  • Loading branch information
natesales committed Jul 21, 2023
1 parent 38aea5e commit 839f323
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/embed/templates/peer.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protocol bgp {{ UniqueProtocolName $peer.ProtocolName $peerName $af $peer.ASN $p
{{ if BoolDeref $peer.AllowLocalAS }}allow local as ASN;{{ end }}
{{ if BoolDeref $peer.TTLSecurity }}ttl security on;{{ end }}
{{ if BoolDeref $peer.ConfederationMember }}confederation member yes;{{ end }}
{{ if BoolDeref $peer.PreferOlderRoutes }}prefer older on;{{ end }}
{{ if StrDeref $peer.Role }}local role {{ StrDeref $peer.Role }};{{ end }}
{{ if BoolDeref $peer.RequireRoles }}require roles;{{ end }}
{{ if not (BoolDeref $peer.InterpretCommunities) }}interpret communities off;{{ end }}
Expand Down Expand Up @@ -80,7 +81,6 @@ protocol bgp {{ UniqueProtocolName $peer.ProtocolName $peerName $af $peer.ASN $p
{{ if BoolDeref $peer.AddPathRx }}add paths rx;{{ end }}
{{ if BoolDeref $peer.AdvertiseHostname }}advertise hostname on;{{ end }}
{{ if BoolDeref $peer.DisableAfterError }}disable after error on;{{ end }}
{{ if BoolDeref $peer.PreferOlderRoutes }}prefer older on;{{ end }}
import filter {
{{ if $global.NoAccept }}reject; # no-accept: true{{ end }}
{{ if (not (BoolDeref $peer.Import)) }}reject; # import: false{{ end }}
Expand Down
1 change: 1 addition & 0 deletions tests/generate-complex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ peers:
confederation-member: true
filter-never-via-route-servers: true
confederation: 1
prefer-older-routes: true
as-prefs:
65510: 10
65520: 20
Expand Down

0 comments on commit 839f323

Please sign in to comment.