mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Merge commit '140c534fb81d0e165b7d674e869c646455ed19d1' into thread-next
This commit is contained in:
commit
1127f19a7a
@ -5,6 +5,7 @@ variables:
|
||||
DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/"
|
||||
IMG_BASE: registry.nic.cz/labs/bird
|
||||
TOOLS_DIR: /var/lib/gitlab-runner/bird-tools
|
||||
STAYRTR_BINARY: /var/lib/gitlab-runner/stayrtr-0.1-108-g8d18a41-linux-x86_64
|
||||
|
||||
stages:
|
||||
- image
|
||||
@ -506,6 +507,7 @@ build-birdlab:
|
||||
- sudo git clean -fx
|
||||
- git pull --ff-only
|
||||
- mv $DIR/bird $DIR/birdc netlab/common
|
||||
- ln -s $STAYRTR_BINARY netlab/common/stayrtr
|
||||
|
||||
.test: &test-base
|
||||
stage: test
|
||||
@ -516,7 +518,7 @@ build-birdlab:
|
||||
script:
|
||||
- cd $TOOLS_DIR/netlab
|
||||
- sudo ./stop
|
||||
- sudo ./runtest -m check $TEST_NAME
|
||||
- sudo ./runtest -s v3 -m check $TEST_NAME
|
||||
|
||||
test-ospf-base:
|
||||
<<: *test-base
|
||||
@ -588,6 +590,16 @@ test-bgp-merged:
|
||||
variables:
|
||||
TEST_NAME: cf-bgp-merged
|
||||
|
||||
test-bgp-flowspec:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-bgp-flowspec
|
||||
|
||||
test-bgp-rs-multitab:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-bgp-rs-multitab
|
||||
|
||||
test-ebgp-loop:
|
||||
<<: *test-base
|
||||
variables:
|
||||
@ -598,12 +610,32 @@ test-ebgp-star:
|
||||
variables:
|
||||
TEST_NAME: cf-ebgp-star
|
||||
|
||||
test-ebgp-role:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-ebgp-role
|
||||
|
||||
test-ebgp-graceful:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-ebgp-graceful
|
||||
|
||||
test-ebgp-import-limit:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-ebgp-import-limit
|
||||
|
||||
test-ibgp-loop:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-ibgp-loop
|
||||
|
||||
test-ibgp-star:
|
||||
test-ibgp-loop-big:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-ibgp-loop-big
|
||||
|
||||
test-ibgp-flat:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-ibgp-flat
|
||||
@ -622,3 +654,8 @@ test-rip-base:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-rip-base
|
||||
|
||||
test-kernel-learn:
|
||||
<<: *test-base
|
||||
variables:
|
||||
TEST_NAME: cf-kernel-learn
|
||||
|
17
conf/conf.c
17
conf/conf.c
@ -199,6 +199,23 @@ config_free(struct config *c)
|
||||
rfree(c->pool);
|
||||
}
|
||||
|
||||
/**
|
||||
* config_free_old - free stored old configuration
|
||||
*
|
||||
* This function frees the old configuration (%old_config) that is saved for the
|
||||
* purpose of undo. It is useful before parsing a new config when reconfig is
|
||||
* requested, to avoid keeping three (perhaps memory-heavy) configs together.
|
||||
*/
|
||||
void
|
||||
config_free_old(void)
|
||||
{
|
||||
tm_stop(config_timer);
|
||||
undo_available = 0;
|
||||
|
||||
config_free(old_config);
|
||||
old_config = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
config_add_obstacle(struct config *c)
|
||||
{
|
||||
|
@ -71,6 +71,7 @@ struct config *config_alloc(const char *name);
|
||||
int config_parse(struct config *);
|
||||
int cli_parse(struct config *);
|
||||
void config_free(struct config *);
|
||||
void config_free_old(void);
|
||||
int config_commit(struct config *, int type, uint timeout);
|
||||
int config_confirm(void);
|
||||
int config_undo(void);
|
||||
|
@ -226,6 +226,8 @@ else
|
||||
;;
|
||||
openbsd*)
|
||||
sysdesc=bsd
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
;;
|
||||
dragonfly*)
|
||||
sysdesc=bsd
|
||||
|
@ -1215,6 +1215,11 @@ This argument can be omitted if there exists only a single instance.
|
||||
restarted otherwise. Changes in filters usually lead to restart of
|
||||
affected protocols.
|
||||
|
||||
The previous configuration is saved and the user can switch back to it
|
||||
with <ref id="cli-configure-undo" name="configure undo"> command. The
|
||||
old saved configuration is released (even if the reconfiguration attempt
|
||||
fails due to e.g. a syntax error).
|
||||
|
||||
If <cf/soft/ option is used, changes in filters does not cause BIRD to
|
||||
restart affected protocols, therefore already accepted routes (according
|
||||
to old filters) would be still propagated, but new routes would be
|
||||
|
@ -245,6 +245,8 @@ async_config(void)
|
||||
{
|
||||
struct config *conf;
|
||||
|
||||
config_free_old();
|
||||
|
||||
log(L_INFO "Reconfiguration requested by SIGHUP");
|
||||
if (!unix_read_config(&conf, config_name))
|
||||
{
|
||||
@ -283,6 +285,9 @@ cmd_read_config(const char *name)
|
||||
void
|
||||
cmd_check_config(const char *name)
|
||||
{
|
||||
if (cli_access_restricted())
|
||||
return;
|
||||
|
||||
struct config *conf = cmd_read_config(name);
|
||||
if (!conf)
|
||||
return;
|
||||
@ -327,6 +332,8 @@ cmd_reconfig(const char *name, int type, uint timeout)
|
||||
if (cli_access_restricted())
|
||||
return;
|
||||
|
||||
config_free_old();
|
||||
|
||||
struct config *conf = cmd_read_config(name);
|
||||
if (!conf)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user