Enable, disable or restart a given protocol instance, instances matching
the <cf><m/pattern/</cf> or <cf/all/ instances.
- <tag><label id="cli-reload">reload [in|out] <m/name/|"<m/pattern/"|all</tag>
+ <tag><label id="cli-reload">reload [in|out] (<m/name/|"<m/pattern/"|all) [partial <prefix>] </tag>
Reload a given protocol instance, that means re-import routes from the
protocol instance and re-export preferred routes to the instance. If
<cf/in/ or <cf/out/ options are used, the command is restricted to one
propagates the old set of routes. For example when <cf/configure soft/
command was used to change filters.
+ If partial <prefix> option is used, only corresponding routes are reloaded.
+ Protocol BGP does partial reload only if it has locked table, otherwise partial reload for BGP is refused.
+
Re-export always succeeds, but re-import is protocol-dependent and might
fail (for example, if BGP neighbor does not support route-refresh
extension). In that case, re-export is also skipped. Note that for the
PARTIAL term {
struct f_val val;
if (f_eval(f_linearize($2, 1), &val) > F_RETURN) cf_error("Runtime error");
- if (val.type != T_PREFIX_SET) cf_error("Partial spec must be trie");
+ if (val.type != T_PREFIX_SET) cf_error("Partial spec must be prefix set");
$$ = val.val.ti;
}
| /* empty */ { $$ = NULL; }
{ proto_apply_cmd($2, proto_cmd_enable, 1, (uintptr_t) $3); } ;
CF_CLI(RESTART, proto_patt opttext, (<protocol> | \"<pattern>\" | all) [message], [[Restart protocol]])
{ proto_apply_cmd($2, proto_cmd_restart, 1, (uintptr_t) $3); } ;
-CF_CLI(RELOAD, proto_patt partial_opt, <protocol> | \"<pattern>\" | all, [[Reload protocol]])
+CF_CLI(RELOAD, proto_patt partial_opt, (<protocol> | \"<pattern>\" | all) [partial <prefix set>], [[Reload protocol]])
{ proto_call_cmd_reload($2, CMD_RELOAD, $3); } ;
CF_CLI(RELOAD IN, proto_patt partial_opt, <protocol> | \"<pattern>\" | all, [[Reload protocol (just imported routes)]])
{ proto_call_cmd_reload($3, CMD_RELOAD_IN, $4); } ;
if ((c->in_keep & RIK_PREFILTER) == RIK_PREFILTER)
channel_schedule_reload(c, cir);
else if (! c->proto->reload_routes(c, cir))
- bug( "Partial reload was refused. Maybe you tried partial reload on bgp?");
+ bug( "Partial reload was refused. Maybe you tried partial reload on BGP with unlocked table?");
}
static void
if ((c->in_keep & RIK_PREFILTER) == RIK_PREFILTER)
channel_schedule_reload(c, cir);
else if (! c->proto->reload_routes(c, cir))
- cli_msg(-15, "Partial reload was refused. Maybe you tried partial reload on bgp?");
+ cli_msg(-15, "Partial reload was refused. Maybe you tried partial reload on BGP with unlocked table?");
}
const struct channel_class channel_basic = {