Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Apr 30, 2021
2 parents ba0e0f8 + 6c5020e commit e28c21a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ bcg uses RFC 8092 BGP Large Communities
| description | Description string (just for human reference) |
| max-prefix-action | Max prefix violation action |
| no-peeringdb | Don't query PeeringDB for peering information |
| next-hop-self | Enable "next hop self;" for specific peers |
#### VRRP instance config options
Expand Down
2 changes: 2 additions & 0 deletions internal/config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type Peer struct {
Listen string `yaml:"listen" json:"listen" toml:"Listen"`
MaxPfxAction string `yaml:"max-prefix-action" json:"max-prefix-action" toml:"MaxPrefixAction"`
NoPeeringDB bool `yaml:"no-peeringdb" json:"no-peeringdb" toml:"NoPeeringDB"`
NextHopSelf bool `yaml:"next-hop-self" json:"next-hop-self" toml:"NextHopSelf"`


QueryTime string `yaml:"-" json:"-" toml:"-"`
Name string `yaml:"-" json:"-" toml:"-"`
Expand Down
2 changes: 1 addition & 1 deletion templates/peer.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protocol bgp {{ $peer.Name }}v{{ $af }}_{{ $i }} {
import keep filtered;
{{ end -}}
import limit AS{{ $peer.Asn }}_{{ $peer.Name }}_MAXPFX_v{{ $af }} action {{ $peer.MaxPfxAction }};
{{ if eq $peer.Asn $global.Asn }}next hop self;{{ end }}
{{ if eq $peer.Asn $global.Asn || $peer.NextHopSelf }}next hop self;{{ end }}
import filter {
{{ if not $peer.SkipFilter }}reject_bogons();{{ end }}
{{ if $peer.EnforceFirstAs }}enforce_first_as({{ $peer.Asn }});{{ end }}
Expand Down

0 comments on commit e28c21a

Please sign in to comment.