X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Froute.c;h=79832dcad0f4c899bc3cbc936884707b08445fa0;hb=3b6d366005b6fc23c705b3156e365316f6ab776c;hp=559cf2fcd0e85ee463c4cc165b86208609892525;hpb=0871c3095151bce6a4031a2662aa51b7193b855c;p=tinc diff --git a/src/route.c b/src/route.c index 559cf2fc..79832dca 100644 --- a/src/route.c +++ b/src/route.c @@ -54,10 +54,6 @@ static const size_t icmp6_size = sizeof(struct icmp6_hdr); static const size_t ns_size = sizeof(struct nd_neighbor_solicit); static const size_t opt_size = sizeof(struct nd_opt_hdr); -#ifndef MAX -#define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - static timeout_t age_subnets_timeout; /* RFC 1071 */ @@ -485,7 +481,7 @@ static void clamp_mss(const node_t *source, const node_t *via, vpn_packet_t *pac csum += csum >> 16; csum ^= 0xffff; DATA(packet)[start + 16] = csum >> 8; - DATA(packet)[start + 17] = csum; + DATA(packet)[start + 17] = csum & 0xff; break; } } @@ -494,7 +490,7 @@ static void age_subnets(void *data) { (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];