cfm: Log more aggressively amidst packet loss.
[sliver-openvswitch.git] / lib / cfm.c
1 /*
2  * Copyright (c) 2010, 2011 Nicira Networks.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include <config.h>
18 #include "cfm.h"
19
20 #include <assert.h>
21 #include <stdint.h>
22 #include <stdlib.h>
23 #include <string.h>
24
25 #include "byte-order.h"
26 #include "dynamic-string.h"
27 #include "flow.h"
28 #include "hash.h"
29 #include "hmap.h"
30 #include "ofpbuf.h"
31 #include "packets.h"
32 #include "poll-loop.h"
33 #include "timer.h"
34 #include "timeval.h"
35 #include "unixctl.h"
36 #include "vlog.h"
37
38 VLOG_DEFINE_THIS_MODULE(cfm);
39
40 #define CFM_MAX_RMPS 256
41
42 /* Ethernet destination address of CCM packets. */
43 static const uint8_t eth_addr_ccm[6] = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x30 };
44 static const uint8_t eth_addr_ccm_x[6] = {
45     0x01, 0x23, 0x20, 0x00, 0x00, 0x30
46 };
47
48 #define ETH_TYPE_CFM 0x8902
49
50 /* A 'ccm' represents a Continuity Check Message from the 802.1ag
51  * specification.  Continuity Check Messages are broadcast periodically so that
52  * hosts can determine whom they have connectivity to.
53  *
54  * The minimum length of a CCM as specified by IEEE 802.1ag is 75 bytes.
55  * Previous versions of Open vSwitch generated 74-byte CCM messages, so we
56  * accept such messages too. */
57 #define CCM_LEN 75
58 #define CCM_ACCEPT_LEN 74
59 #define CCM_MAID_LEN 48
60 #define CCM_OPCODE 1 /* CFM message opcode meaning CCM. */
61 #define CCM_RDI_MASK 0x80
62 struct ccm {
63     uint8_t  mdlevel_version; /* MD Level and Version */
64     uint8_t  opcode;
65     uint8_t  flags;
66     uint8_t  tlv_offset;
67     ovs_be32 seq;
68     ovs_be16 mpid;
69     uint8_t  maid[CCM_MAID_LEN];
70
71     /* Defined by ITU-T Y.1731 should be zero */
72     ovs_be16 interval_ms_x;      /* Transmission interval in ms. */
73     ovs_be64 mpid64;             /* MPID in extended mode. */
74     uint8_t opdown;              /* Operationally down. */
75     uint8_t  zero[5];
76
77     /* TLV space. */
78     uint8_t end_tlv;
79 } __attribute__((packed));
80 BUILD_ASSERT_DECL(CCM_LEN == sizeof(struct ccm));
81
82 struct cfm {
83     char *name;                 /* Name of this CFM object. */
84     struct hmap_node hmap_node; /* Node in all_cfms list. */
85
86     uint64_t mpid;
87     bool extended;         /* Extended mode. */
88     bool fault;            /* Indicates connectivity fault. */
89     bool unexpected_recv;  /* Received an unexpected CCM. */
90     bool opup;             /* Operational State. */
91     bool remote_opup;      /* Remote Operational State. */
92
93     uint32_t seq;          /* The sequence number of our last CCM. */
94     uint8_t ccm_interval;  /* The CCM transmission interval. */
95     int ccm_interval_ms;   /* 'ccm_interval' in milliseconds. */
96     uint16_t ccm_vlan;     /* Vlan tag of CCM PDUs. */
97     uint8_t maid[CCM_MAID_LEN]; /* The MAID of this CFM. */
98
99     struct timer tx_timer;    /* Send CCM when expired. */
100     struct timer fault_timer; /* Check for faults when expired. */
101
102     struct hmap remote_mps;   /* Remote MPs. */
103
104     /* Result of cfm_get_remote_mpids(). Updated only during fault check to
105      * avoid flapping. */
106     uint64_t *rmps_array;     /* Cache of remote_mps. */
107     size_t rmps_array_len;    /* Number of rmps in 'rmps_array'. */
108 };
109
110 /* Remote MPs represent foreign network entities that are configured to have
111  * the same MAID as this CFM instance. */
112 struct remote_mp {
113     uint64_t mpid;         /* The Maintenance Point ID of this 'remote_mp'. */
114     struct hmap_node node; /* Node in 'remote_mps' map. */
115
116     bool recv;           /* CCM was received since last fault check. */
117     bool rdi;            /* Remote Defect Indicator. Indicates remote_mp isn't
118                             receiving CCMs that it's expecting to. */
119     bool opup;           /* Operational State. */
120     uint32_t seq;        /* Most recently received sequence number. */
121 };
122
123 static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(20, 30);
124 static struct hmap all_cfms = HMAP_INITIALIZER(&all_cfms);
125
126 static unixctl_cb_func cfm_unixctl_show;
127
128 static const uint8_t *
129 cfm_ccm_addr(const struct cfm *cfm)
130 {
131     return cfm->extended ? eth_addr_ccm_x : eth_addr_ccm;
132 }
133
134 static void
135 cfm_generate_maid(struct cfm *cfm)
136 {
137     const char *ovs_md_name = "ovs";
138     const char *ovs_ma_name = "ovs";
139     uint8_t *ma_p;
140     size_t md_len, ma_len;
141
142     memset(cfm->maid, 0, CCM_MAID_LEN);
143
144     md_len = strlen(ovs_md_name);
145     ma_len = strlen(ovs_ma_name);
146
147     assert(md_len && ma_len && md_len + ma_len + 4 <= CCM_MAID_LEN);
148
149     cfm->maid[0] = 4;                           /* MD name string format. */
150     cfm->maid[1] = md_len;                      /* MD name size. */
151     memcpy(&cfm->maid[2], ovs_md_name, md_len); /* MD name. */
152
153     ma_p = cfm->maid + 2 + md_len;
154     ma_p[0] = 2;                           /* MA name string format. */
155     ma_p[1] = ma_len;                      /* MA name size. */
156     memcpy(&ma_p[2], ovs_ma_name, ma_len); /* MA name. */
157 }
158
159 static int
160 ccm_interval_to_ms(uint8_t interval)
161 {
162     switch (interval) {
163     case 0:  NOT_REACHED(); /* Explicitly not supported by 802.1ag. */
164     case 1:  return 3;      /* Not recommended due to timer resolution. */
165     case 2:  return 10;     /* Not recommended due to timer resolution. */
166     case 3:  return 100;
167     case 4:  return 1000;
168     case 5:  return 10000;
169     case 6:  return 60000;
170     case 7:  return 600000;
171     default: NOT_REACHED(); /* Explicitly not supported by 802.1ag. */
172     }
173
174     NOT_REACHED();
175 }
176
177 static long long int
178 cfm_fault_interval(struct cfm *cfm)
179 {
180     /* According to the 802.1ag specification we should assume every other MP
181      * with the same MAID has the same transmission interval that we have.  If
182      * an MP has a different interval, cfm_process_heartbeat will register it
183      * as a fault (likely due to a configuration error).  Thus we can check all
184      * MPs at once making this quite a bit simpler.
185      *
186      * According to the specification we should check when (ccm_interval_ms *
187      * 3.5)ms have passed. */
188     return (cfm->ccm_interval_ms * 7) / 2;
189 }
190
191 static uint8_t
192 ms_to_ccm_interval(int interval_ms)
193 {
194     uint8_t i;
195
196     for (i = 7; i > 0; i--) {
197         if (ccm_interval_to_ms(i) <= interval_ms) {
198             return i;
199         }
200     }
201
202     return 1;
203 }
204
205 static uint32_t
206 hash_mpid(uint64_t mpid)
207 {
208     return hash_bytes(&mpid, sizeof mpid, 0);
209 }
210
211 static bool
212 cfm_is_valid_mpid(bool extended, uint64_t mpid)
213 {
214     /* 802.1ag specification requires MPIDs to be within the range [1, 8191].
215      * In extended mode we relax this requirement. */
216     return mpid >= 1 && (extended || mpid <= 8191);
217 }
218
219 static struct remote_mp *
220 lookup_remote_mp(const struct cfm *cfm, uint64_t mpid)
221 {
222     struct remote_mp *rmp;
223
224     HMAP_FOR_EACH_IN_BUCKET (rmp, node, hash_mpid(mpid), &cfm->remote_mps) {
225         if (rmp->mpid == mpid) {
226             return rmp;
227         }
228     }
229
230     return NULL;
231 }
232
233 void
234 cfm_init(void)
235 {
236     unixctl_command_register("cfm/show", "[interface]", 0, 1, cfm_unixctl_show,
237                              NULL);
238 }
239
240 /* Allocates a 'cfm' object called 'name'.  'cfm' should be initialized by
241  * cfm_configure() before use. */
242 struct cfm *
243 cfm_create(const char *name)
244 {
245     struct cfm *cfm;
246
247     cfm = xzalloc(sizeof *cfm);
248     cfm->name = xstrdup(name);
249     hmap_init(&cfm->remote_mps);
250     cfm_generate_maid(cfm);
251     hmap_insert(&all_cfms, &cfm->hmap_node, hash_string(cfm->name, 0));
252     cfm->remote_opup = true;
253     return cfm;
254 }
255
256 void
257 cfm_destroy(struct cfm *cfm)
258 {
259     struct remote_mp *rmp, *rmp_next;
260
261     if (!cfm) {
262         return;
263     }
264
265     HMAP_FOR_EACH_SAFE (rmp, rmp_next, node, &cfm->remote_mps) {
266         hmap_remove(&cfm->remote_mps, &rmp->node);
267         free(rmp);
268     }
269
270     hmap_destroy(&cfm->remote_mps);
271     hmap_remove(&all_cfms, &cfm->hmap_node);
272     free(cfm->rmps_array);
273     free(cfm->name);
274     free(cfm);
275 }
276
277 /* Should be run periodically to update fault statistics messages. */
278 void
279 cfm_run(struct cfm *cfm)
280 {
281     if (timer_expired(&cfm->fault_timer)) {
282         long long int interval = cfm_fault_interval(cfm);
283         struct remote_mp *rmp, *rmp_next;
284         bool old_cfm_fault = cfm->fault;
285
286         cfm->fault = cfm->unexpected_recv;
287         cfm->unexpected_recv = false;
288
289         cfm->rmps_array_len = 0;
290         free(cfm->rmps_array);
291         cfm->rmps_array = xmalloc(hmap_count(&cfm->remote_mps) *
292                                   sizeof *cfm->rmps_array);
293
294         cfm->remote_opup = true;
295         HMAP_FOR_EACH_SAFE (rmp, rmp_next, node, &cfm->remote_mps) {
296
297             if (!rmp->recv) {
298                 VLOG_DBG("%s: no CCM from RMP %"PRIu64" in the last %lldms",
299                          cfm->name, rmp->mpid, interval);
300                 hmap_remove(&cfm->remote_mps, &rmp->node);
301                 free(rmp);
302             } else {
303                 rmp->recv = false;
304
305                 if (rmp->mpid == cfm->mpid) {
306                     VLOG_WARN_RL(&rl,"%s: received CCM with local MPID"
307                                  " %"PRIu64, cfm->name, rmp->mpid);
308                     cfm->fault = true;
309                 }
310
311                 if (rmp->rdi) {
312                     VLOG_DBG("%s: RDI bit flagged from RMP %"PRIu64, cfm->name,
313                              rmp->mpid);
314                     cfm->fault = true;
315                 }
316
317                 if (!rmp->opup) {
318                     cfm->remote_opup = rmp->opup;
319                 }
320
321                 cfm->rmps_array[cfm->rmps_array_len++] = rmp->mpid;
322             }
323         }
324
325         if (hmap_is_empty(&cfm->remote_mps)) {
326             cfm->fault = true;
327         }
328
329         if (old_cfm_fault != cfm->fault) {
330             VLOG_INFO_RL(&rl, "%s: CFM fault status changed to %s",
331                          cfm->name, cfm->fault ? "true" : "false");
332         }
333
334         timer_set_duration(&cfm->fault_timer, interval);
335     }
336 }
337
338 /* Should be run periodically to check if the CFM module has a CCM message it
339  * wishes to send. */
340 bool
341 cfm_should_send_ccm(struct cfm *cfm)
342 {
343     return timer_expired(&cfm->tx_timer);
344 }
345
346 /* Composes a CCM message into 'packet'.  Messages generated with this function
347  * should be sent whenever cfm_should_send_ccm() indicates. */
348 void
349 cfm_compose_ccm(struct cfm *cfm, struct ofpbuf *packet,
350                 uint8_t eth_src[ETH_ADDR_LEN])
351 {
352     struct ccm *ccm;
353
354     timer_set_duration(&cfm->tx_timer, cfm->ccm_interval_ms);
355     eth_compose(packet, cfm_ccm_addr(cfm), eth_src, ETH_TYPE_CFM, sizeof *ccm);
356
357     if (cfm->ccm_vlan) {
358         eth_push_vlan(packet, htons(cfm->ccm_vlan));
359     }
360
361     ccm = packet->l3;
362     ccm->mdlevel_version = 0;
363     ccm->opcode = CCM_OPCODE;
364     ccm->tlv_offset = 70;
365     ccm->seq = htonl(++cfm->seq);
366     ccm->flags = cfm->ccm_interval;
367     memcpy(ccm->maid, cfm->maid, sizeof ccm->maid);
368     memset(ccm->zero, 0, sizeof ccm->zero);
369     ccm->end_tlv = 0;
370
371     if (cfm->extended) {
372         ccm->mpid = htons(hash_mpid(cfm->mpid));
373         ccm->mpid64 = htonll(cfm->mpid);
374         ccm->opdown = !cfm->opup;
375     } else {
376         ccm->mpid = htons(cfm->mpid);
377         ccm->mpid64 = htonll(0);
378         ccm->opdown = 0;
379     }
380
381     if (cfm->ccm_interval == 0) {
382         assert(cfm->extended);
383         ccm->interval_ms_x = htons(cfm->ccm_interval_ms);
384     }
385
386     if (hmap_is_empty(&cfm->remote_mps)) {
387         ccm->flags |= CCM_RDI_MASK;
388     }
389 }
390
391 void
392 cfm_wait(struct cfm *cfm)
393 {
394     timer_wait(&cfm->tx_timer);
395     timer_wait(&cfm->fault_timer);
396 }
397
398 /* Configures 'cfm' with settings from 's'. */
399 bool
400 cfm_configure(struct cfm *cfm, const struct cfm_settings *s)
401 {
402     uint8_t interval;
403     int interval_ms;
404
405     if (!cfm_is_valid_mpid(s->extended, s->mpid) || s->interval <= 0) {
406         return false;
407     }
408
409     cfm->mpid = s->mpid;
410     cfm->extended = s->extended;
411     cfm->opup = s->opup;
412     interval = ms_to_ccm_interval(s->interval);
413     interval_ms = ccm_interval_to_ms(interval);
414
415     cfm->ccm_vlan = s->ccm_vlan & VLAN_VID_MASK;
416     if (cfm->extended && interval_ms != s->interval) {
417         interval = 0;
418         interval_ms = MIN(s->interval, UINT16_MAX);
419     }
420
421     if (interval != cfm->ccm_interval || interval_ms != cfm->ccm_interval_ms) {
422         cfm->ccm_interval = interval;
423         cfm->ccm_interval_ms = interval_ms;
424
425         timer_set_expired(&cfm->tx_timer);
426         timer_set_duration(&cfm->fault_timer, cfm_fault_interval(cfm));
427     }
428
429     return true;
430 }
431
432 /* Returns true if 'cfm' should process packets from 'flow'. */
433 bool
434 cfm_should_process_flow(const struct cfm *cfm, const struct flow *flow)
435 {
436     return (ntohs(flow->dl_type) == ETH_TYPE_CFM
437             && eth_addr_equals(flow->dl_dst, cfm_ccm_addr(cfm)));
438 }
439
440 /* Updates internal statistics relevant to packet 'p'.  Should be called on
441  * every packet whose flow returned true when passed to
442  * cfm_should_process_flow. */
443 void
444 cfm_process_heartbeat(struct cfm *cfm, const struct ofpbuf *p)
445 {
446     struct ccm *ccm;
447     struct eth_header *eth;
448
449     eth = p->l2;
450     ccm = ofpbuf_at(p, (uint8_t *)p->l3 - (uint8_t *)p->data, CCM_ACCEPT_LEN);
451
452     if (!ccm) {
453         VLOG_INFO_RL(&rl, "%s: Received an unparseable 802.1ag CCM heartbeat.",
454                      cfm->name);
455         return;
456     }
457
458     if (ccm->opcode != CCM_OPCODE) {
459         VLOG_INFO_RL(&rl, "%s: Received an unsupported 802.1ag message. "
460                      "(opcode %u)", cfm->name, ccm->opcode);
461         return;
462     }
463
464     /* According to the 802.1ag specification, reception of a CCM with an
465      * incorrect ccm_interval, unexpected MAID, or unexpected MPID should
466      * trigger a fault.  We ignore this requirement for several reasons.
467      *
468      * Faults can cause a controller or Open vSwitch to make potentially
469      * expensive changes to the network topology.  It seems prudent to trigger
470      * them judiciously, especially when CFM is used to check slave status of
471      * bonds. Furthermore, faults can be maliciously triggered by crafting
472      * invalid CCMs. */
473     if (memcmp(ccm->maid, cfm->maid, sizeof ccm->maid)) {
474         cfm->unexpected_recv = true;
475         VLOG_WARN_RL(&rl, "%s: Received unexpected remote MAID from MAC "
476                      ETH_ADDR_FMT, cfm->name, ETH_ADDR_ARGS(eth->eth_src));
477     } else {
478         uint8_t ccm_interval = ccm->flags & 0x7;
479         bool ccm_rdi = ccm->flags & CCM_RDI_MASK;
480         uint16_t ccm_interval_ms_x = ntohs(ccm->interval_ms_x);
481
482         struct remote_mp *rmp;
483         uint64_t ccm_mpid;
484         uint32_t ccm_seq;
485         bool ccm_opdown;
486
487         if (cfm->extended) {
488             ccm_mpid = ntohll(ccm->mpid64);
489             ccm_opdown = ccm->opdown;
490         } else {
491             ccm_mpid = ntohs(ccm->mpid);
492             ccm_opdown = false;
493         }
494         ccm_seq = ntohl(ccm->seq);
495
496         if (ccm_interval != cfm->ccm_interval) {
497             VLOG_WARN_RL(&rl, "%s: received a CCM with an invalid interval"
498                          " (%"PRIu8") from RMP %"PRIu64, cfm->name,
499                          ccm_interval, ccm_mpid);
500         }
501
502         if (cfm->extended && ccm_interval == 0
503             && ccm_interval_ms_x != cfm->ccm_interval_ms) {
504             VLOG_WARN_RL(&rl, "%s: received a CCM with an invalid extended"
505                          " interval (%"PRIu16"ms) from RMP %"PRIu64, cfm->name,
506                          ccm_interval_ms_x, ccm_mpid);
507         }
508
509         rmp = lookup_remote_mp(cfm, ccm_mpid);
510         if (!rmp) {
511             if (hmap_count(&cfm->remote_mps) < CFM_MAX_RMPS) {
512                 rmp = xzalloc(sizeof *rmp);
513                 hmap_insert(&cfm->remote_mps, &rmp->node, hash_mpid(ccm_mpid));
514             } else {
515                 cfm->unexpected_recv = true;
516                 VLOG_WARN_RL(&rl,
517                              "%s: dropped CCM with MPID %"PRIu64" from MAC "
518                              ETH_ADDR_FMT, cfm->name, ccm_mpid,
519                              ETH_ADDR_ARGS(eth->eth_src));
520             }
521         }
522
523         VLOG_DBG("%s: received CCM (seq %"PRIu32") (mpid %"PRIu64")"
524                  " (interval %"PRIu8") (RDI %s)", cfm->name, ccm_seq,
525                  ccm_mpid, ccm_interval, ccm_rdi ? "true" : "false");
526
527         if (rmp) {
528             if (rmp->seq && ccm_seq != (rmp->seq + 1)) {
529                 VLOG_WARN_RL(&rl, "%s: (mpid %"PRIu64") detected sequence"
530                              " numbers which indicate possible connectivity"
531                              " problems (previous %"PRIu32") (current %"PRIu32
532                              ")", cfm->name, ccm_mpid, rmp->seq, ccm_seq);
533             }
534
535             rmp->mpid = ccm_mpid;
536             rmp->recv = true;
537             rmp->seq = ccm_seq;
538             rmp->rdi = ccm_rdi;
539             rmp->opup = !ccm_opdown;
540         }
541     }
542 }
543
544 /* Gets the fault status of 'cfm'.  Returns true when 'cfm' has detected
545  * connectivity problems, false otherwise. */
546 bool
547 cfm_get_fault(const struct cfm *cfm)
548 {
549     return cfm->fault;
550 }
551
552 /* Gets the operational state of 'cfm'.  'cfm' is considered operationally down
553  * if it has received a CCM with the operationally down bit set from any of its
554  * remote maintenance points. Returns true if 'cfm' is operationally up. False
555  * otherwise. */
556 bool
557 cfm_get_opup(const struct cfm *cfm)
558 {
559     return cfm->remote_opup;
560 }
561
562 /* Populates 'rmps' with an array of remote maintenance points reachable by
563  * 'cfm'. The number of remote maintenance points is written to 'n_rmps'.
564  * 'cfm' retains ownership of the array written to 'rmps' */
565 void
566 cfm_get_remote_mpids(const struct cfm *cfm, const uint64_t **rmps,
567                      size_t *n_rmps)
568 {
569     *rmps = cfm->rmps_array;
570     *n_rmps = cfm->rmps_array_len;
571 }
572
573 static struct cfm *
574 cfm_find(const char *name)
575 {
576     struct cfm *cfm;
577
578     HMAP_FOR_EACH_WITH_HASH (cfm, hmap_node, hash_string(name, 0), &all_cfms) {
579         if (!strcmp(cfm->name, name)) {
580             return cfm;
581         }
582     }
583     return NULL;
584 }
585
586 static void
587 cfm_print_details(struct ds *ds, const struct cfm *cfm)
588 {
589     struct remote_mp *rmp;
590
591     ds_put_format(ds, "---- %s ----\n", cfm->name);
592     ds_put_format(ds, "MPID %"PRIu64":%s%s%s\n", cfm->mpid,
593                   cfm->extended ? " extended" : "",
594                   cfm->fault ? " fault" : "",
595                   cfm->unexpected_recv ? " unexpected_recv" : "");
596
597     ds_put_format(ds, "\topstate: %s\n", cfm->opup ? "up" : "down");
598     ds_put_format(ds, "\tremote_opstate: %s\n",
599                   cfm->remote_opup ? "up" : "down");
600     ds_put_format(ds, "\tinterval: %dms\n", cfm->ccm_interval_ms);
601     ds_put_format(ds, "\tnext CCM tx: %lldms\n",
602                   timer_msecs_until_expired(&cfm->tx_timer));
603     ds_put_format(ds, "\tnext fault check: %lldms\n",
604                   timer_msecs_until_expired(&cfm->fault_timer));
605
606     HMAP_FOR_EACH (rmp, node, &cfm->remote_mps) {
607         ds_put_format(ds, "Remote MPID %"PRIu64":%s\n",
608                       rmp->mpid,
609                       rmp->rdi ? " rdi" : "");
610         ds_put_format(ds, "\trecv since check: %s\n",
611                       rmp->recv ? "true" : "false");
612         ds_put_format(ds, "\topstate: %s\n", rmp->opup? "up" : "down");
613     }
614 }
615
616 static void
617 cfm_unixctl_show(struct unixctl_conn *conn, int argc, const char *argv[],
618                  void *aux OVS_UNUSED)
619 {
620     struct ds ds = DS_EMPTY_INITIALIZER;
621     const struct cfm *cfm;
622
623     if (argc > 1) {
624         cfm = cfm_find(argv[1]);
625         if (!cfm) {
626             unixctl_command_reply(conn, 501, "no such CFM object");
627             return;
628         }
629         cfm_print_details(&ds, cfm);
630     } else {
631         HMAP_FOR_EACH (cfm, hmap_node, &all_cfms) {
632             cfm_print_details(&ds, cfm);
633         }
634     }
635
636     unixctl_command_reply(conn, 200, ds_cstr(&ds));
637     ds_destroy(&ds);
638 }