diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-10 23:33:40 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-10-10 23:33:40 +0200 |
commit | 6c9cda6f924ec400e6e55ed009bfaf7a7fd9819d (patch) | |
tree | 5529fc6e527b9f223a3083f0d3ccdcf97ec80994 /proto/bgp | |
parent | eeb2c61653cb8a912a1c92ad3b98932245c2c202 (diff) |
BGP: Fix reconfiguration with import table
Change of some options requires route refresh, but when import table is
active, channel reload is done from it instead of doing full route
refresh. So in this case we request it internally.
Diffstat (limited to 'proto/bgp')
-rw-r--r-- | proto/bgp/bgp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 68b716b2..e33d53f5 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -2073,6 +2073,7 @@ bgp_reconfigure(struct proto *P, struct proto_config *CF) static int bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *import_changed, int *export_changed) { + struct bgp_proto *p = (void *) C->proto; struct bgp_channel *c = (void *) C; struct bgp_channel_config *new = (void *) CC; struct bgp_channel_config *old = c->cf; @@ -2095,7 +2096,13 @@ bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *impor if ((new->gw_mode != old->gw_mode) || (new->aigp != old->aigp) || (new->cost != old->cost)) + { + /* import_changed itself does not force ROUTE_REFRESH when import_table is active */ + if (c->c.in_table && (c->c.channel_state == CS_UP)) + bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH); + *import_changed = 1; + } if (!ipa_equal(new->next_hop_addr, old->next_hop_addr) || (new->next_hop_self != old->next_hop_self) || |