mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Nest: Fix crash in route reload when some channels are not up.
Only channels that are up can be reloaded.
This commit is contained in:
parent
b7d7599ce3
commit
a297a4f044
@ -1952,7 +1952,7 @@ proto_cmd_reload(struct proto *p, uintptr_t dir, int cnt UNUSED)
|
|||||||
/* All channels must support reload */
|
/* All channels must support reload */
|
||||||
if (dir != CMD_RELOAD_OUT)
|
if (dir != CMD_RELOAD_OUT)
|
||||||
WALK_LIST(c, p->channels)
|
WALK_LIST(c, p->channels)
|
||||||
if (!channel_reloadable(c))
|
if ((c->channel_state == CS_UP) && !channel_reloadable(c))
|
||||||
{
|
{
|
||||||
cli_msg(-8006, "%s: reload failed", p->name);
|
cli_msg(-8006, "%s: reload failed", p->name);
|
||||||
return;
|
return;
|
||||||
@ -1963,11 +1963,13 @@ proto_cmd_reload(struct proto *p, uintptr_t dir, int cnt UNUSED)
|
|||||||
/* re-importing routes */
|
/* re-importing routes */
|
||||||
if (dir != CMD_RELOAD_OUT)
|
if (dir != CMD_RELOAD_OUT)
|
||||||
WALK_LIST(c, p->channels)
|
WALK_LIST(c, p->channels)
|
||||||
|
if (c->channel_state == CS_UP)
|
||||||
channel_request_reload(c);
|
channel_request_reload(c);
|
||||||
|
|
||||||
/* re-exporting routes */
|
/* re-exporting routes */
|
||||||
if (dir != CMD_RELOAD_IN)
|
if (dir != CMD_RELOAD_IN)
|
||||||
WALK_LIST(c, p->channels)
|
WALK_LIST(c, p->channels)
|
||||||
|
if (c->channel_state == CS_UP)
|
||||||
channel_request_feeding(c);
|
channel_request_feeding(c);
|
||||||
|
|
||||||
cli_msg(-15, "%s: reloading", p->name);
|
cli_msg(-15, "%s: reloading", p->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user