1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

BGP: Improve reconfiguration

Several BGP channel options (including 'next hop self') could be
reconfigured without session reset, with just route refeed/refresh.
The patch improves reconfiguration code to do it that way.
This commit is contained in:
Ondrej Zajicek (work)
2019-08-06 15:29:06 +02:00
parent f6a6a77640
commit e2b530aa72
4 changed files with 22 additions and 11 deletions

View File

@@ -619,7 +619,7 @@ channel_reconfigure(struct channel *c, struct channel_config *cf)
c->last_tx_filter_change = current_time();
/* Execute channel-specific reconfigure hook */
if (c->channel->reconfigure && !c->channel->reconfigure(c, cf))
if (c->channel->reconfigure && !c->channel->reconfigure(c, cf, &import_changed, &export_changed))
return 0;
/* If the channel is not open, it has no routes and we cannot reload it anyways */

View File

@@ -451,7 +451,7 @@ struct channel_class {
uint config_size; /* Size of channel config data structure */
void (*init)(struct channel *, struct channel_config *); /* Create new instance */
int (*reconfigure)(struct channel *, struct channel_config *); /* Try to reconfigure instance, returns success */
int (*reconfigure)(struct channel *, struct channel_config *, int *import_changed, int *export_changed); /* Try to reconfigure instance, returns success */
int (*start)(struct channel *); /* Start the instance */
void (*shutdown)(struct channel *); /* Stop the instance */
void (*cleanup)(struct channel *); /* Channel finished flush */