Skip to content

Commit 906822a

Browse files
committed
fix: only-announce parameter (#166)
1 parent 6739e77 commit 906822a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/embed/templates/peer.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ protocol bgp {{ UniqueProtocolName $peer.ProtocolName $af $peer.ASN }} {
245245
{{ end }}
246246

247247
{{ if not (Empty $peer.OnlyAnnounce) }}
248-
if (!net ~ [
248+
if !(net ~ [
249249
{{ BirdSet $peer.OnlyAnnounce }}
250250
]) then _reject("prefix not in only-announce list");
251251
{{ end }}

pkg/process/process.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ func Load(configBlob []byte) (*config.Config, error) {
253253
log.Fatalf("Both DefaultLocalPref and OptimizeInbound set, Pathvector cannot optimize this peer.")
254254
}
255255

256-
if peerData.OnlyAnnounce != nil && peerData.AnnounceAll != nil {
257-
log.Fatalf("[%s] only-announce and announce-all cannot both be set", peerName)
256+
if peerData.OnlyAnnounce != nil && util.Deref(peerData.AnnounceAll) {
257+
log.Fatalf("[%s] only-announce and announce-all cannot both be true", peerName)
258258
}
259259

260260
// Categorize prefix-communities

0 commit comments

Comments
 (0)