X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Froute.c;h=559cf2fcd0e85ee463c4cc165b86208609892525;hb=0871c3095151bce6a4031a2662aa51b7193b855c;hp=3fe6edb2f8680abf012e405f2f1dc2d19ac8e4dc;hpb=4214794ce68b9456146a5bf35db9e58da836b728;p=tinc diff --git a/src/route.c b/src/route.c index 3fe6edb2..559cf2fc 100644 --- a/src/route.c +++ b/src/route.c @@ -31,7 +31,6 @@ #include "protocol.h" #include "route.h" #include "subnet.h" -#include "utils.h" rmode_t routing_mode = RMODE_ROUTER; fmode_t forwarding_mode = FMODE_INTERNAL; @@ -505,7 +504,7 @@ static void age_subnets(void *data) { } } - for list_each(connection_t, c, connection_list) + for list_each(connection_t, c, &connection_list) if(c->edge) { send_del_subnet(c, s); } @@ -544,7 +543,7 @@ static void learn_mac(mac_t *address) { /* And tell all other tinc daemons it's our MAC */ - for list_each(connection_t, c, connection_list) + for list_each(connection_t, c, &connection_list) if(c->edge) { send_add_subnet(c, subnet); } @@ -588,7 +587,7 @@ static void fragment_ipv4_packet(node_t *dest, vpn_packet_t *packet, length_t et todo = ntohs(ip.ip_len) - ip_size; if(ether_size + ip_size + todo != packet->len) { - logger(DEBUG_TRAFFIC, LOG_WARNING, "Length of packet (%d) doesn't match length in IPv4 header (%d)", packet->len, (int)(ether_size + ip_size + todo)); + logger(DEBUG_TRAFFIC, LOG_WARNING, "Length of packet (%d) doesn't match length in IPv4 header (%zu)", packet->len, ether_size + ip_size + todo); return; } @@ -1112,7 +1111,7 @@ static void route_mac(node_t *source, vpn_packet_t *packet) { static void send_pcap(vpn_packet_t *packet) { pcap = false; - for list_each(connection_t, c, connection_list) { + for list_each(connection_t, c, &connection_list) { if(!c->status.pcap) { continue; } @@ -1125,7 +1124,7 @@ static void send_pcap(vpn_packet_t *packet) { } if(send_request(c, "%d %d %d", CONTROL, REQ_PCAP, len)) { - send_meta(c, (char *)DATA(packet), len); + send_meta(c, DATA(packet), len); } } }