summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-05-19 23:21:54 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-05-19 23:21:54 +0200
commitb0b11b2295fbb8399949139d82156e123e005902 (patch)
tree1360c16987ee1afba702a99c07366e6b845d3e69 /utils.c
parent69c5043fdcea724f59055630eb0cf593c41732cb (diff)
downloadnetifd-b0b11b2295fbb8399949139d82156e123e005902.tar.gz
move dns server/search list parsing to interface core to support peerdns=0 + static entries
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 156b025..f1143c5 100644
--- 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;