instance: dump netdev params
authorStijn Tintel <stijn@linux-ipv6.be>
Mon, 26 Sep 2022 17:42:32 +0000 (20:42 +0300)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 26 Sep 2022 20:01:45 +0000 (23:01 +0300)
Add the netdev param to the instance_dump function to make it possible
to verify this for an existing instance.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: John Crispin <john@phrozen.org>
service/instance.c

index 8202d65129a151fc47c6aacdfa268fdd3c7ccbf0..bb4ded70fc9c10c96709b2f2497e81ff5ecbd119 100644 (file)
@@ -1707,6 +1707,15 @@ void instance_dump(struct blob_buf *b, struct service_instance *in, int verbose)
                blobmsg_close_table(b, e);
        }
 
+       if (!avl_is_empty(&in->netdev.avl)) {
+               struct blobmsg_list_node *var;
+               void *n = blobmsg_open_array(b, "netdev");
+
+               blobmsg_list_for_each(&in->netdev, var)
+                       blobmsg_add_string(b, NULL, blobmsg_data(var->data));
+               blobmsg_close_array(b, n);
+       }
+
        if (in->reload_signal)
                blobmsg_add_u32(b, "reload_signal", in->reload_signal);