mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Fix some failed asserts due to add_tail()
When config structures are copied due to template application, we need to reset list node structure before calling add_tail(). Thanks to Mikael Magnusson for patches.
This commit is contained in:
@@ -626,6 +626,7 @@ channel_copy_config(struct channel_config *src, struct proto_config *proto)
|
||||
struct channel_config *dst = cfg_alloc(src->channel->config_size);
|
||||
|
||||
memcpy(dst, src, src->channel->config_size);
|
||||
memset(&dst->n, 0, sizeof(node));
|
||||
add_tail(&proto->channels, &dst->n);
|
||||
CALL(src->channel->copy_config, dst, src);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user