1
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-15 05:42:15 +01:00

Nest: Add channel config flag to distinguish new or copy

It is useful to distinguish whehter channel config returned from
channel_config_get() was allocated new, or existing from template.
Caller may want to initialize new ones.
This commit is contained in:
Ondrej Zajicek 2022-10-03 18:53:21 +02:00
parent 92a8565547
commit 8478de8817
2 changed files with 2 additions and 0 deletions

View File

@ -804,6 +804,7 @@ channel_config_get(const struct channel_class *cc, const char *name, uint net_ty
cf_error("Multiple %s channels", name);
cf->parent = proto;
cf->copy = 1;
return cf;
}

View File

@ -493,6 +493,7 @@ struct channel_config {
u8 ra_mode; /* Mode of received route advertisements (RA_*) */
u16 preference; /* Default route preference */
u32 debug; /* Debugging flags (D_*) */
u8 copy; /* Value from channel_config_get() is new (0) or from template (1) */
u8 merge_limit; /* Maximal number of nexthops for RA_MERGED */
u8 in_keep_filtered; /* Routes rejected in import filter are kept */
u8 rpki_reload; /* RPKI changes trigger channel reload */