summaryrefslogtreecommitdiffhomepage
path: root/table/destination.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-06-09 21:20:07 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-06-09 23:20:15 +0900
commitca832f94bbb1c8e0cecfd7118366a48159512e23 (patch)
tree7197e7bfb41d612be3549ddfa8bd2f3f2c71f2db /table/destination.go
parenta97129f1400f2be76942124f535fb9831063aa5a (diff)
server: kill peerMsg
Peers send and receive messages via channels, which could lead to a deadlock. With this patch, multiple goroutines are used for network I/Os per peer but one goroutine handle all ribs (including the global rib). So there is no messages via channels between peers. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/destination.go')
-rw-r--r--table/destination.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/table/destination.go b/table/destination.go
index 16795a89..a58ffbf1 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -56,7 +56,7 @@ type Destination interface {
setNlri(nlri bgp.AddrPrefixInterface)
getBestPathReason() string
setBestPathReason(string)
- getBestPath() Path
+ GetBestPath() Path
setBestPath(path Path)
getKnownPathList() []Path
setKnownPathList([]Path)
@@ -102,7 +102,7 @@ func (dd *DestinationDefault) ToApiStruct() *api.Destination {
idx := func() int {
for i, p := range dd.knownPathList {
- if p == dd.getBestPath() {
+ if p == dd.GetBestPath() {
return i
}
}
@@ -152,7 +152,7 @@ func (dd *DestinationDefault) setBestPathReason(reason string) {
dd.bestPathReason = reason
}
-func (dd *DestinationDefault) getBestPath() Path {
+func (dd *DestinationDefault) GetBestPath() Path {
return dd.bestPath
}
@@ -906,7 +906,7 @@ func (ipv6d *IPv6Destination) MarshalJSON() ([]byte, error) {
prefix := ipv6d.getNlri().(*bgp.IPv6AddrPrefix).Prefix
idx := func() int {
for i, p := range ipv6d.DestinationDefault.knownPathList {
- if p == ipv6d.DestinationDefault.getBestPath() {
+ if p == ipv6d.DestinationDefault.GetBestPath() {
return i
}
}
@@ -962,7 +962,7 @@ func (ipv4vpnd *IPv4VPNDestination) MarshalJSON() ([]byte, error) {
prefix := ipv4vpnd.getNlri().(*bgp.LabelledVPNIPAddrPrefix).Prefix
idx := func() int {
for i, p := range ipv4vpnd.DestinationDefault.knownPathList {
- if p == ipv4vpnd.DestinationDefault.getBestPath() {
+ if p == ipv4vpnd.DestinationDefault.GetBestPath() {
return i
}
}
@@ -1000,7 +1000,7 @@ func (evpnd *EVPNDestination) MarshalJSON() ([]byte, error) {
nlri := evpnd.getNlri().(*bgp.EVPNNLRI)
idx := func() int {
for i, p := range evpnd.DestinationDefault.knownPathList {
- if p == evpnd.DestinationDefault.getBestPath() {
+ if p == evpnd.DestinationDefault.GetBestPath() {
return i
}
}