File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,14 +121,15 @@ protocol bgp {{ UniqueProtocolName $peer.ProtocolName $af $peer.ASN }} {
121121 bgp_large_community.delete ([({{ IntDeref $peer .RemoveAllCommunities }}, *, *)]);
122122 {{ end }}
123123
124+ {{ if not (IntDeref $peer .DefaultLocalPref ) }}
125+ {{ if BoolDeref $peer .SetLocalPref }}bgp_local_pref = {{ $peer .LocalPref }}; # pathvector:localpref{{ end }}
126+ {{ end }}
127+
124128 {{ range $asn , $pref := Uint32MapDeref $peer .ASPrefs }}
125129 if ({{ $asn }} ~ bgp_path) then { bgp_local_pref = {{ $pref }}; }
126130 {{ end }}
127131
128132 {{ if BoolDeref $peer .AllowBlackholeCommunity }}process_blackholes();{{ end }}
129- {{ if not (IntDeref $peer .DefaultLocalPref ) }}
130- {{ if BoolDeref $peer .SetLocalPref }}bgp_local_pref = {{ $peer .LocalPref }}; # pathvector:localpref{{ end }}
131- {{ end }}
132133 {{ if BoolDeref $peer .HonorGracefulShutdown }}honor_graceful_shutdown();{{ end }}
133134
134135 {{ range $i , $community := StringSliceIter $peer .ImportStandardCommunities }}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package templating
33import (
44 "embed"
55 "fmt"
6- "github.com/natesales/pathvector/pkg/util"
76 "os"
87 "strconv"
98 "strings"
@@ -13,6 +12,7 @@ import (
1312 log "github.com/sirupsen/logrus"
1413
1514 "github.com/natesales/pathvector/pkg/config"
15+ "github.com/natesales/pathvector/pkg/util"
1616)
1717
1818var protocolNames []string
You can’t perform that action at this time.
0 commit comments