bool udp_confirmed = n->status.udp_confirmed;
n->status.udp_confirmed = true;
logger(mesh, MESHLINK_DEBUG, "Sending UDP reply length %d to %s", packet->len, n->name);
- n->out_meta += packet->len;
+ n->out_meta += packet->len + SPTPS_DATAGRAM_OVERHEAD;
send_udppacket(mesh, n, packet);
n->status.udp_confirmed = udp_confirmed;
}
return;
}
- n->in_meta += packet->len;
+ n->in_meta += packet->len + SPTPS_DATAGRAM_OVERHEAD;
if(!packet->data[0]) {
/* It's a probe request, send back a reply */
logger(mesh, MESHLINK_DEBUG, "Sending UDP probe length %d to %s", len, n->name);
- n->out_meta += packet.len;
+ n->out_meta += packet.len + SPTPS_DATAGRAM_OVERHEAD;
send_udppacket(mesh, n, &packet);
}