static void
setenv_stats(struct multi_context *m, struct context *c)
{
- dco_get_peer_stats_multi(&m->top.c1.tuntap->dco, m);
+ if (dco_enabled(&m->top.options))
+ {
+ dco_get_peer_stats_multi(&m->top.c1.tuntap->dco, m);
+ }
setenv_counter(c->c2.es, "bytes_received", c->c2.link_read_bytes + c->c2.dco_read_bytes);
setenv_counter(c->c2.es, "bytes_sent", c->c2.link_write_bytes + c->c2.dco_write_bytes);
status_reset(so);
- dco_get_peer_stats_multi(&m->top.c1.tuntap->dco, m);
+ if (dco_enabled(&m->top.options))
+ {
+ dco_get_peer_stats_multi(&m->top.c1.tuntap->dco, m);
+ }
if (version == 1)
{