#include "protocol.h"
#include "route.h"
#include "subnet.h"
-#include "utils.h"
rmode_t routing_mode = RMODE_ROUTER;
fmode_t forwarding_mode = FMODE_INTERNAL;
(void)data;
bool left = false;
- for splay_each(subnet_t, s, myself->subnet_tree) {
+ for splay_each(subnet_t, s, &myself->subnet_tree) {
if(s->expires && s->expires < now.tv_sec) {
if(debug_level >= DEBUG_TRAFFIC) {
char netstr[MAXNETSTR];
}
}
- for list_each(connection_t, c, connection_list)
+ for list_each(connection_t, c, &connection_list)
if(c->edge) {
send_del_subnet(c, s);
}
/* 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);
}
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;
}
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;
}
}
if(send_request(c, "%d %d %d", CONTROL, REQ_PCAP, len)) {
- send_meta(c, (char *)DATA(packet), len);
+ send_meta(c, DATA(packet), len);
}
}
}