]> git.meshlink.io Git - meshlink-tiny/blobdiff - src/net_packet.c
Remove MTU and traffic statistics.
[meshlink-tiny] / src / net_packet.c
index d4eb0c4f7d7eddd141e05518ea0ce877c2268de6..21e164a81135e9f95310bf268d0f5de879bcf059 100644 (file)
@@ -41,9 +41,6 @@ static void receive_packet(meshlink_handle_t *mesh, node_t *n, vpn_packet_t *pac
        if(n->status.blacklisted) {
                logger(mesh, MESHLINK_WARNING, "Dropping packet from blacklisted node %s", n->name);
        } else {
-               n->in_packets++;
-               n->in_bytes += packet->len;
-
                route(mesh, n, packet);
        }
 }
@@ -176,8 +173,6 @@ bool receive_sptps_record(void *handle, uint8_t type, const void *data, uint16_t
 */
 void send_packet(meshlink_handle_t *mesh, node_t *n, vpn_packet_t *packet) {
        if(n == mesh->self) {
-               n->out_packets++;
-               n->out_bytes += packet->len;
                // TODO: send to application
                return;
        }
@@ -189,10 +184,6 @@ void send_packet(meshlink_handle_t *mesh, node_t *n, vpn_packet_t *packet) {
                return;
        }
 
-       n->out_packets++;
-       n->out_bytes += packet->len;
-       n->status.want_udp = true;
-
        send_sptps_packet(mesh, n, packet);
        return;
 }