From 1678bc07467e6d977fc2f6bf830274ca92e0a6e5 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 24 Nov 2020 03:42:23 +0100 Subject: 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. --- proto/static/static.c | 1 + 1 file changed, 1 insertion(+) (limited to 'proto') diff --git a/proto/static/static.c b/proto/static/static.c index 7b22d49b..941e916f 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -643,6 +643,7 @@ static_copy_config(struct proto_config *dest, struct proto_config *src) { dnh = cfg_alloc(sizeof(struct static_route)); memcpy(dnh, snh, sizeof(struct static_route)); + memset(&dnh->n, 0, sizeof(node)); if (!drt) add_tail(&d->routes, &(dnh->n)); -- cgit v1.2.3