mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-10 01:11:12 +02:00
No reason to restrict Peer ASN's to private only. (#576)
* No reason to restrict Peer ASN's to private only. This change is to restrict to public and private ranges. * gofmt
This commit is contained in:
parent
4d6b7faaf9
commit
c39c13b6cf
@ -257,9 +257,12 @@ func newGlobalPeers(ips []net.IP, ports []uint16, asns []uint32, passwords []str
|
||||
}
|
||||
|
||||
for i := 0; i < len(ips); i++ {
|
||||
if !((asns[i] >= 64512 && asns[i] <= 65535) ||
|
||||
if !((asns[i] >= 1 && asns[i] <= 23455) ||
|
||||
(asns[i] >= 23457 && asns[i] <= 63999) ||
|
||||
(asns[i] >= 64512 && asns[i] <= 65534) ||
|
||||
(asns[i] >= 131072 && asns[i] <= 4199999999) ||
|
||||
(asns[i] >= 4200000000 && asns[i] <= 4294967294)) {
|
||||
return nil, fmt.Errorf("Invalid ASN number \"%d\" for global BGP peer",
|
||||
return nil, fmt.Errorf("Reserved ASN number \"%d\" for global BGP peer",
|
||||
asns[i])
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user