Skip to content
Snippets Groups Projects
Commit 976215cd authored by Daniel Czerwonk's avatar Daniel Czerwonk
Browse files

renamed vars to make the difference between configured and aggreed more clear

parent 025588b0
Branches
Tags
No related merge requests found
......@@ -29,23 +29,23 @@ type fsmAddressFamily struct {
updateSender *UpdateSender
addPathSend routingtable.ClientOptions
addPathRecv bool
addPathRX bool
addPathSend routingtable.ClientOptions
addPathRXConfigured bool
addPathRX bool
initialized bool
}
func newFSMAddressFamily(afi uint16, safi uint8, params *familyParameters, fsm *FSM) *fsmAddressFamily {
return &fsmAddressFamily{
afi: afi,
safi: safi,
fsm: fsm,
rib: params.rib,
importFilter: params.importFilter,
exportFilter: params.exportFilter,
addPathRecv: params.addPathRecv,
addPathSend: params.addPathSend,
afi: afi,
safi: safi,
fsm: fsm,
rib: params.rib,
importFilter: params.importFilter,
exportFilter: params.exportFilter,
addPathRXConfigured: params.addPathRXConfigured,
addPathSend: params.addPathSend,
}
}
......
......@@ -197,14 +197,14 @@ func (s *openSentState) processAddPathCapability(addPathCap packet.AddPathCapabi
f.addPathRX = true
}
case packet.AddPathSend:
if f.addPathRecv {
if f.addPathRXConfigured {
f.addPathRX = true
}
case packet.AddPathSendReceive:
if !f.addPathSend.BestOnly {
f.addPathRX = true
}
if f.addPathRecv {
if f.addPathRXConfigured {
f.addPathRX = true
}
}
......
......@@ -47,8 +47,8 @@ type familyParameters struct {
importFilter *filter.Filter
exportFilter *filter.Filter
addPathSend routingtable.ClientOptions
addPathRecv bool
addPathSend routingtable.ClientOptions
addPathRXConfigured bool
}
func (p *peer) snapshot() PeerInfo {
......@@ -133,11 +133,11 @@ func newPeer(c config.Peer, server *bgpServer) (*peer, error) {
if c.IPv4 != nil {
p.ipv4 = &familyParameters{
rib: c.IPv4.RIB,
importFilter: filterOrDefault(c.IPv4.ImportFilter),
exportFilter: filterOrDefault(c.IPv4.ExportFilter),
addPathRecv: c.IPv4.AddPathRecv,
addPathSend: c.IPv4.AddPathSend,
rib: c.IPv4.RIB,
importFilter: filterOrDefault(c.IPv4.ImportFilter),
exportFilter: filterOrDefault(c.IPv4.ExportFilter),
addPathRXConfigured: c.IPv4.AddPathRecv,
addPathSend: c.IPv4.AddPathSend,
}
}
......@@ -154,11 +154,11 @@ func newPeer(c config.Peer, server *bgpServer) (*peer, error) {
if c.IPv6 != nil {
p.ipv6 = &familyParameters{
rib: c.IPv6.RIB,
importFilter: filterOrDefault(c.IPv6.ImportFilter),
exportFilter: filterOrDefault(c.IPv6.ExportFilter),
addPathRecv: c.IPv6.AddPathRecv,
addPathSend: c.IPv6.AddPathSend,
rib: c.IPv6.RIB,
importFilter: filterOrDefault(c.IPv6.ImportFilter),
exportFilter: filterOrDefault(c.IPv6.ExportFilter),
addPathRXConfigured: c.IPv6.AddPathRecv,
addPathSend: c.IPv6.AddPathSend,
}
caps = append(caps, multiProtocolCapability(packet.IPv6AFI))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment