csum += csum >> 16;
csum ^= 0xffff;
DATA(packet)[start + 16] = csum >> 8;
- DATA(packet)[start + 17] = csum;
+ DATA(packet)[start + 17] = csum & 0xff;
break;
}
}
(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);
}
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;
}