move dns server/search list parsing to interface core to support peerdns=0 + static...
[project/netifd.git] / utils.c
diff --git a/utils.c b/utils.c
index 156b025..f1143c5 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -119,6 +119,17 @@ vlist_simple_flush(struct vlist_simple_tree *tree)
 }
 
 void
+vlist_simple_replace(struct vlist_simple_tree *dest, struct vlist_simple_tree *old)
+{
+       struct vlist_simple_node *n, *tmp;
+
+       list_for_each_entry_safe(n, tmp, &old->list, list) {
+               list_del(&n->list);
+               vlist_simple_add(dest, n);
+       }
+}
+
+void
 vlist_simple_flush_all(struct vlist_simple_tree *tree)
 {
        tree->version = -1;