]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
fixup! fixup! fixup! partial import seems working
authorKaterina Kubecova <katerina.kubecova@nic.cz>
Wed, 25 Oct 2023 12:55:46 +0000 (14:55 +0200)
committerKaterina Kubecova <katerina.kubecova@nic.cz>
Wed, 25 Oct 2023 12:55:46 +0000 (14:55 +0200)
doc/bird.sgml
nest/config.Y
nest/proto.c

index 3fdb1535378a8d2fc3eec1f10f2002b04af5ab19..465273059b0e114601ad61fa3d4f984880166080 100644 (file)
@@ -1263,7 +1263,7 @@ This argument can be omitted if there exists only a single instance.
        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
@@ -1274,6 +1274,9 @@ This argument can be omitted if there exists only a single instance.
        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
index 3d0b5a203eb05f712630fed22e0ba8fc484d6279..5340d8681415c7ab920c9e0331ab60c5d2ef3b98 100644 (file)
@@ -921,7 +921,7 @@ partial_opt:
   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; }
@@ -933,7 +933,7 @@ CF_CLI(ENABLE, proto_patt opttext, (<protocol> | \"<pattern>\" | all) [message],
 { 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); } ;
index 932d337ab19ccc08dab15582c91ae455f6a46679..d4c80058a36c8cfab022e569a091c8514f76946e 100644 (file)
@@ -1151,7 +1151,7 @@ channel_request_reload(struct channel *c)
   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
@@ -1165,7 +1165,7 @@ channel_request_partial_reload(struct channel *c, struct channel_import_request
   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 = {