>From ed0d3126bbd58ebb5ea0d11d9746f3ff817d16f6 Mon Sep 17 00:00:00 2001
From: Mikael Magnusson <mikma@users.sourceforge.net>
Date: Wed, 9 Sep 2020 00:28:03 +0200
Subject: [PATCH 2/2] Nest: Fix assert failed in static_copy_config

Initializing n in the copy of the static route fixes:
assertion 'n->prev == ((void *)0)' failed at ../lib/lists.c:79
---
 proto/static/static.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/proto/static/static.c b/proto/static/static.c
index 72b14991..06e9fb47 100644
--- a/proto/static/static.c
+++ b/proto/static/static.c
@@ -589,6 +589,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(struct node));
 
       if (!drt)
 	add_tail(&d->routes, &(dnh->n));
-- 
2.25.1



