File tree 1 file changed +13
-12
lines changed
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -1708,18 +1708,6 @@ func (d *Daemon) init() error {
1708
1708
1709
1709
// Setup BGP listener.
1710
1710
d .bgp = bgp .NewServer ()
1711
- if bgpAddress != "" && bgpASN != 0 && bgpRouterID != "" {
1712
- if bgpASN > math .MaxUint32 {
1713
- return fmt .Errorf ("Cannot convert BGP ASN to uint32: Upper bound exceeded" )
1714
- }
1715
-
1716
- err := d .bgp .Start (bgpAddress , uint32 (bgpASN ), net .ParseIP (bgpRouterID ))
1717
- if err != nil {
1718
- return err
1719
- }
1720
-
1721
- logger .Info ("Started BGP server" )
1722
- }
1723
1711
1724
1712
// Setup DNS listener.
1725
1713
d .dns = dns .NewServer (d .db .Cluster , func (name string , full bool ) (* dns.Zone , error ) {
@@ -1769,6 +1757,19 @@ func (d *Daemon) init() error {
1769
1757
}
1770
1758
1771
1759
// Setup tertiary listeners that may use managed network addresses and must be started after networks.
1760
+ if bgpAddress != "" && bgpASN != 0 && bgpRouterID != "" {
1761
+ if bgpASN > math .MaxUint32 {
1762
+ return fmt .Errorf ("Cannot convert BGP ASN to uint32: Upper bound exceeded" )
1763
+ }
1764
+
1765
+ err := d .bgp .Start (bgpAddress , uint32 (bgpASN ), net .ParseIP (bgpRouterID ))
1766
+ if err != nil {
1767
+ return err
1768
+ }
1769
+
1770
+ logger .Info ("Started BGP server" )
1771
+ }
1772
+
1772
1773
dnsAddress := d .localConfig .DNSAddress ()
1773
1774
if dnsAddress != "" {
1774
1775
err = d .dns .Start (dnsAddress )
You can’t perform that action at this time.
0 commit comments