mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-18 06:51: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/"
|
DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/"
|
||||||
IMG_BASE: registry.nic.cz/labs/bird
|
IMG_BASE: registry.nic.cz/labs/bird
|
||||||
TOOLS_DIR: /var/lib/gitlab-runner/bird-tools
|
TOOLS_DIR: /var/lib/gitlab-runner/bird-tools
|
||||||
|
STAYRTR_BINARY: /var/lib/gitlab-runner/stayrtr-0.1-108-g8d18a41-linux-x86_64
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- image
|
- image
|
||||||
@ -506,6 +507,7 @@ build-birdlab:
|
|||||||
- sudo git clean -fx
|
- sudo git clean -fx
|
||||||
- git pull --ff-only
|
- git pull --ff-only
|
||||||
- mv $DIR/bird $DIR/birdc netlab/common
|
- mv $DIR/bird $DIR/birdc netlab/common
|
||||||
|
- ln -s $STAYRTR_BINARY netlab/common/stayrtr
|
||||||
|
|
||||||
.test: &test-base
|
.test: &test-base
|
||||||
stage: test
|
stage: test
|
||||||
@ -516,7 +518,7 @@ build-birdlab:
|
|||||||
script:
|
script:
|
||||||
- cd $TOOLS_DIR/netlab
|
- cd $TOOLS_DIR/netlab
|
||||||
- sudo ./stop
|
- sudo ./stop
|
||||||
- sudo ./runtest -m check $TEST_NAME
|
- sudo ./runtest -s v3 -m check $TEST_NAME
|
||||||
|
|
||||||
test-ospf-base:
|
test-ospf-base:
|
||||||
<<: *test-base
|
<<: *test-base
|
||||||
@ -588,6 +590,16 @@ test-bgp-merged:
|
|||||||
variables:
|
variables:
|
||||||
TEST_NAME: cf-bgp-merged
|
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-ebgp-loop:
|
||||||
<<: *test-base
|
<<: *test-base
|
||||||
variables:
|
variables:
|
||||||
@ -598,12 +610,32 @@ test-ebgp-star:
|
|||||||
variables:
|
variables:
|
||||||
TEST_NAME: cf-ebgp-star
|
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-ibgp-loop:
|
||||||
<<: *test-base
|
<<: *test-base
|
||||||
variables:
|
variables:
|
||||||
TEST_NAME: cf-ibgp-loop
|
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
|
<<: *test-base
|
||||||
variables:
|
variables:
|
||||||
TEST_NAME: cf-ibgp-flat
|
TEST_NAME: cf-ibgp-flat
|
||||||
@ -622,3 +654,8 @@ test-rip-base:
|
|||||||
<<: *test-base
|
<<: *test-base
|
||||||
variables:
|
variables:
|
||||||
TEST_NAME: cf-rip-base
|
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);
|
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
|
void
|
||||||
config_add_obstacle(struct config *c)
|
config_add_obstacle(struct config *c)
|
||||||
{
|
{
|
||||||
|
@ -71,6 +71,7 @@ struct config *config_alloc(const char *name);
|
|||||||
int config_parse(struct config *);
|
int config_parse(struct config *);
|
||||||
int cli_parse(struct config *);
|
int cli_parse(struct config *);
|
||||||
void config_free(struct config *);
|
void config_free(struct config *);
|
||||||
|
void config_free_old(void);
|
||||||
int config_commit(struct config *, int type, uint timeout);
|
int config_commit(struct config *, int type, uint timeout);
|
||||||
int config_confirm(void);
|
int config_confirm(void);
|
||||||
int config_undo(void);
|
int config_undo(void);
|
||||||
|
@ -226,6 +226,8 @@ else
|
|||||||
;;
|
;;
|
||||||
openbsd*)
|
openbsd*)
|
||||||
sysdesc=bsd
|
sysdesc=bsd
|
||||||
|
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
;;
|
;;
|
||||||
dragonfly*)
|
dragonfly*)
|
||||||
sysdesc=bsd
|
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
|
restarted otherwise. Changes in filters usually lead to restart of
|
||||||
affected protocols.
|
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
|
If <cf/soft/ option is used, changes in filters does not cause BIRD to
|
||||||
restart affected protocols, therefore already accepted routes (according
|
restart affected protocols, therefore already accepted routes (according
|
||||||
to old filters) would be still propagated, but new routes would be
|
to old filters) would be still propagated, but new routes would be
|
||||||
|
@ -245,6 +245,8 @@ async_config(void)
|
|||||||
{
|
{
|
||||||
struct config *conf;
|
struct config *conf;
|
||||||
|
|
||||||
|
config_free_old();
|
||||||
|
|
||||||
log(L_INFO "Reconfiguration requested by SIGHUP");
|
log(L_INFO "Reconfiguration requested by SIGHUP");
|
||||||
if (!unix_read_config(&conf, config_name))
|
if (!unix_read_config(&conf, config_name))
|
||||||
{
|
{
|
||||||
@ -283,6 +285,9 @@ cmd_read_config(const char *name)
|
|||||||
void
|
void
|
||||||
cmd_check_config(const char *name)
|
cmd_check_config(const char *name)
|
||||||
{
|
{
|
||||||
|
if (cli_access_restricted())
|
||||||
|
return;
|
||||||
|
|
||||||
struct config *conf = cmd_read_config(name);
|
struct config *conf = cmd_read_config(name);
|
||||||
if (!conf)
|
if (!conf)
|
||||||
return;
|
return;
|
||||||
@ -327,6 +332,8 @@ cmd_reconfig(const char *name, int type, uint timeout)
|
|||||||
if (cli_access_restricted())
|
if (cli_access_restricted())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
config_free_old();
|
||||||
|
|
||||||
struct config *conf = cmd_read_config(name);
|
struct config *conf = cmd_read_config(name);
|
||||||
if (!conf)
|
if (!conf)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user