summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
authorJeff Bean <bean@uber.com>2018-06-22 19:12:33 -0700
committerJeff Bean <bean@uber.com>2018-06-22 19:12:33 -0700
commit154650594c5b40b2905eb73b90f52de72f6ced16 (patch)
tree2ba6ffe099ff216a92df7fb3806eb9aeaa988208 /server/peer.go
parent954562d65a90af4e8d2e9bf29e4c2bccc4420b38 (diff)
Fixing all megacheck errors.
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/server/peer.go b/server/peer.go
index e3981024..3a43fac9 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -42,8 +42,8 @@ type PeerGroup struct {
func NewPeerGroup(c *config.PeerGroup) *PeerGroup {
return &PeerGroup{
Conf: c,
- members: make(map[string]config.Neighbor, 0),
- dynamicNeighbors: make(map[string]*config.DynamicNeighbor, 0),
+ members: make(map[string]config.Neighbor),
+ dynamicNeighbors: make(map[string]*config.DynamicNeighbor),
}
}
@@ -293,7 +293,7 @@ func (peer *Peer) markLLGRStale(fs []bgp.RouteFamily) []*table.Path {
for i, p := range paths {
doStale := true
for _, c := range p.GetCommunities() {
- if c == bgp.COMMUNITY_NO_LLGR {
+ if c == uint32(bgp.COMMUNITY_NO_LLGR) {
doStale = false
p = p.Clone(true)
break
@@ -301,7 +301,7 @@ func (peer *Peer) markLLGRStale(fs []bgp.RouteFamily) []*table.Path {
}
if doStale {
p = p.Clone(false)
- p.SetCommunities([]uint32{bgp.COMMUNITY_LLGR_STALE}, false)
+ p.SetCommunities([]uint32{uint32(bgp.COMMUNITY_LLGR_STALE)}, false)
}
paths[i] = p
}
@@ -317,10 +317,6 @@ func (peer *Peer) stopPeerRestarting() {
}
-func (peer *Peer) getAccepted(rfList []bgp.RouteFamily) []*table.Path {
- return peer.adjRibIn.PathList(rfList, true)
-}
-
func (peer *Peer) filterPathFromSourcePeer(path, old *table.Path) *table.Path {
if peer.ID() != path.GetSource().Address.String() {
return path