summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2020-11-24 03:42:23 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2020-11-24 03:42:23 +0100
commit1678bc07467e6d977fc2f6bf830274ca92e0a6e5 (patch)
treefdbdc70d526b7dedabdabd9bed889f0fdc2e023e /nest
parentc9ae81656f97bcc55910e80b6f00d3ee9383d848 (diff)
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.
Diffstat (limited to 'nest')
-rw-r--r--nest/proto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 41b3a6b9..748601c3 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -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);