Add the ability to only advertise local routes or don't advertise at all (#932)

* Add the ability to only advertise local routes or don't advertise at all

* Reorder processing to shortcircuit no advertising
This commit is contained in:
Asim Aslam
2019-11-11 15:28:37 +00:00
committed by GitHub
parent 65b1283459
commit fd5c29addc
2 changed files with 51 additions and 5 deletions

View File

@@ -147,6 +147,10 @@ const (
AdvertiseAll Strategy = iota
// AdvertiseBest advertises optimal routes to the network
AdvertiseBest
// AdvertiseLocal will only advertise the local routes
AdvertiseLocal
// AdvertiseNone will not advertise any routes
AdvertiseNone
)
// String returns human readable Strategy
@@ -156,6 +160,10 @@ func (s Strategy) String() string {
return "all"
case AdvertiseBest:
return "best"
case AdvertiseLocal:
return "local"
case AdvertiseNone:
return "none"
default:
return "unknown"
}